How to add two label in one gridbox?
        Posted  
        
            by Jessy
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jessy
        
        
        
        Published on 2010-03-31T09:45:49Z
        Indexed on 
            2010/03/31
            9:53 UTC
        
        
        Read the original article
        Hit count: 361
        
Hello everyone, How can I add two label in the same grid box? e.g. in row 1, col 1 the will be 2 labels? The code below will add the label in two different grid.
JPanel chckBox = new JPanel(new GridLayout(1,8,3,3)); 
JLabel label1 = new JLabel("A");
JLabel label2 = new JLabel("B");
...
chckBox.add(label1);
chckBox.add(label2);
...
        © Stack Overflow or respective owner