• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed in Swing BoxLayout

 
srinivas suri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/*Can someone help me why i'm getting a plane frame?? */

 
Wesleigh Pieters
Ranch Hand
Posts: 81
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please use code tags

if I compile this I get a frame with an test field, a password filed and a login button? what problems are you having exactly?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> Can someone help me why i'm getting a plane frame??

because you've set the frame visible before adding any components.

run it, then drag the frame a little wider - do they appear now?
 
srinivas suri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much! ...yah, that was the bug, i've changed the code a bit and set the setVisible to true after adding the components, it works fine now ......
 
Campbell Ritchie
Sheriff
Posts: 48381
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
Remember, setVisible() comes last.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic