943,900 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 890
  • Java RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jul 5th, 2009
0

Re: JComponent Placement

huh. I tried it without the JEmailMenuBar (It has a JMenuBar and a JToolbar in it arranged with a GridBagLayout) and it still doesn't work for me....

Are there any methods that I'm forgetting to call, or something like that?
Reputation Points: 41
Solved Threads: 13
Posting Whiz in Training
llemes4011 is offline Offline
224 posts
since Aug 2008
Jul 5th, 2009
0

Re: JComponent Placement

Use setJMenuBar method: It has a seperate layer.
Java Syntax (Toggle Plain Text)
  1. setJMenuBar(menuBar);
Last edited by adatapost; Jul 5th, 2009 at 1:45 am.
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jul 5th, 2009
0

Re: JComponent Placement

Ok, I changed my JEmailMenuBar to extend the JMenuBar class, ad added it through the setJMenuBar() method, but it didn't help the contentViever's sizing problems....
Reputation Points: 41
Solved Threads: 13
Posting Whiz in Training
llemes4011 is offline Offline
224 posts
since Aug 2008
Jul 5th, 2009
0

Re: JComponent Placement

What is the current size of contentViever? Size of contentViever will be grows or shrink with frame.
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jul 5th, 2009
0

Re: JComponent Placement

contentViewer's size is the size of the Frame. however. the JSplitFrame has a size of (0,0)
Reputation Points: 41
Solved Threads: 13
Posting Whiz in Training
llemes4011 is offline Offline
224 posts
since Aug 2008
Jul 5th, 2009
1

Re: JComponent Placement

If you want to change the size of any control use setPreferredSize() method.
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jul 5th, 2009
0

Re: JComponent Placement

YAY! I got it, Thanks so much for your help =D It ended up that It was the placement of some static variables. I was trying it access them from another package and I think some how it was throwing it off somehow... the whole static thing is still kind of new to me O.o but very useful.
Reputation Points: 41
Solved Threads: 13
Posting Whiz in Training
llemes4011 is offline Offline
224 posts
since Aug 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: I need a class in Java API...
Next Thread in Java Forum Timeline: getting nullpoint exception again





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC