Master:
# 1    Set JLabel background color                  
luke1
Online no
State 453
Grouping Super Admin
Class class4
Score 250
Wealth 62
Posts 230
Login 07:37:57
Give an example:
ajlabel.setOpaque(true);
ajlabel.setBackground(Color.WHITE);

So need to setOpaque first, otherwise, setBackground does not work since by default JLabel is transparent.
Hits: 325, Date: 2010-05-09 01:48:50
[Agree] ( 6 ) [Against] ( 7 )

# 2    insets of java                  
luke1
Online no
State 453
Grouping Super Admin
Class class4
Score 250
Wealth 62
Posts 230
Login 07:37:57
using in gridbaylayout
new Insets(top,left,bottom,right);
put for reference, it is different from CSS border, etc.
Hits: 324, Date: 2010-05-09 02:26:58
[Agree] ( 7 ) [Against] ( 7 )

1 - 2 [ 2]

Reply: Set JLabel background color

*First line:


More content:


Tags:



Hint: You cannot post here before loginLogin | Register

nothing