How do we show the gridline in GridLayout?

Posted by Jessy on Stack Overflow See other posts from Stack Overflow or by Jessy
Published on 2010-03-14T22:17:32Z Indexed on 2010/03/14 22:25 UTC
Read the original article Hit count: 347

Filed under:
|

How do we show the gridline in GridLayout? in Java?

JPanel panel = new JPanel(new GridLayout(10,10));
panel.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));

for (int i =0; i<(10*10); i++){
   panel.add(new JLabel("Label"));
}

© Stack Overflow or respective owner

Related posts about java

Related posts about gridlayout