|
-
September 19th, 2000, 01:30 AM
#1
JLabels in Swings.
Hi,
How to position the JLabels other than using the left righ& center align. Can we use setBounds in JApplets like in AWT(APPLETS).B'coz in my prg of swings only the textfields & buttons are seen , the labels are not seen. How to place JLabels &JTextFields,JButtons etc in reqd position. Pl. educate how to format the screen in swings in reqd. x,y co-ordinates of our choice.
-
September 19th, 2000, 01:39 AM
#2
Re: JLabels in Swings.
Hi ,
Yes U can use setBounds to position labels.
But its not preferred.U can also use gridbag layout to exactly position components.
If U find that complex,the best way is to add components to Jpanels and use a setPreferredSize method for those panels which will exactly fit the components in the required position.
Eg. labelPanel.setPreferredSize( new Dimension (x,y) );
Hope this will help u.
If u have any more doubt reply to [email protected]
Best regards
Praveen.C
When going gets tough,
Tough gets going.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|