Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About Jpanel

 
sajeevi bangamuwage
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I put jTabbedPane & jScrollPane to JFrame. but when i put buttons and labels or any thing i cant adjust them as i want.
Is there layouts to jTabbedPane & jScrollPane as jFrames. How to set null.Im using net beans to do my project.I set the layout to null in jFrame.so i put components as i like. Plz tel me how to like that in jTabbedPane & jScrollPane .


Thank you
Sajeevi.
 
Jared Cope
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Laying out componants is one of the things that I hate doing. At the end of the day, you have to learn how to use the Java layout managers and pick one that you are comfortable using.

I personally go for the GridBagLayout manager most times. There is a bit of a learning curve, but once you master it you can do most anything you need to do.

Good luck,

Cheers, Jared.
 
David Mace
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing you could consider doing is using the Absolute Layout Manager that ships with NetBeans. It seems to me that they didn't recommend packaging it with you apps, but I may just be imagining that. Anyways, it was originally intended to be used within the IDE itself so that you can layout the components visually without all the tricky-ness inherit in the different layout managers.

What I do a lot of the time is use this Absolute manager and then lay everything out. When I'm done, I switch the layout on the container to be Gridbag and it closely approximates what I had done with the other manager.

HTH,
David
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic