java - JLabel width doesn't seem right -
i have long jlabel of width 80000. sits in panel of width 80000. however, label ends "..." towards middle of panel, meaning gets cut off. i've set maximum size, minimum size, size, , preferred size of jlabel have width of 80000. panel in sits inside of jscrollpane.
any ideas why jlabel not seem have width thinks has?
here's way:
you can repaint jlabel own custom graphics or text:
protected void paintcomponent(graphics g) { super.paintcomponent(g); g.drawimage(foregroundimage, x, y, this); g.drawstring("your big string"); jlabel.setbounds(0,0,100,100); //set jlabel bounds... jlabel.paint(g); }
Comments
Post a Comment