Reputation: 1345
I created a GUI and now I created a JLabel, from which I only want to see the top border.
How does it get done?
JLabel label = new JLabel( "TEXT" );
label.setBounds( 90, 350, 440, 20 );
label.setBorder( LineBorder.createBlackLineBorder());
Upvotes: 2
Views: 1791
Reputation: 11327
It's easy
lable.setBorder(new MatteBorder(1, 0, 0, 0, Color.BLACK));
Upvotes: 4