I have a question about Java layout.I want to design a layout like follows:
-------------------------
| JLabel | |
| JLabel | |
| JLabel | Component |
| JLabel | |
| JLabel | |
-------------------------
So I do it:
GridLayout layout=new GridLayout(5,2);
Container c=getContentPane();
JLabel l1=new JLabel("one");
JLabel l2=new JLabel("two");
JLabel l3=new JLabel("three");
JLabel l4=new JLabel("four");
JLabel l5=new JLabel("five");
l1.setSize(100,200);
l1.setBounds(10,0*50,700,50);
l2.setSize(100,200);
l2.setBounds(10,1*50,700,50);
l3.setSize(100,200);
l3.setBounds(10,2*50,700,50);
l4.setSize(100,200);
l4.setBounds(10,2*50,700,50);
l5.setSize(100,200);
l5.setBounds(10,2*50,700,50);
c.setLayout(layout);
c.add(l1);
c.add(l2);
c.add(l3);
c.add(l4);
c.add(l5);
setSize(800,600);
show();
Then I define a Component:
Component ss; // I use Component as dislaying Video
My question is how to put my Component into GridLayout like above picture?
Thanks!
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing