display code:
- Code: Select all
System.out.println("Component: "+eventText.getText()+" x=" + e.getX() + ", y=" + e.getY());
balloon.show(eventText, e.getX(), e.getY());
output from console: Component: Betalt 25/11/08 x=43, y=0
witch shows it is supposed to be rendered
all subsequent shows will render it correctly.
balloon creating code:
- Code: Select all
final BalloonTip balloon = new BalloonTip();
//set up balloon
{
final ShadowSettings settings = balloon.getShadowSettings();
final RoundedRectangularBalloonShape shape = new RoundedRectangularBalloonShape();
final LeftBottomDrop shadowStyle = new LeftBottomDrop();
final ZPanel balloonContent = new ZPanel();
//shadowStyle.setScale(0.8d);
shadowStyle.setXOffset(19);
shadowStyle.setYOffset(19);
shape.setPosition(SwingConstants.RIGHT);
balloon.setShadowStyle(shadowStyle);
settings.setColor(Color.BLACK);
settings.setOpacity(0.25f);
balloon.setBalloonShape(shape);
balloonText.setWrapStyleWord(true);
balloonText.setLineWrap(true);
balloonText.setEditable(false);
balloonText.setFocusable(false);
balloonText.setOpaque(false);
balloonContent.add(balloonText);
balloon.setContent(balloonContent);
}
The component it is supposed to be rendered on is a JLabel placed in a JPanel with a GirdLayout that again is wrapped north in a BorderLayout and then put inside a JSplitPane
any suggestions to what could cause this? Could this be fixed?