File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Components size

 
Hui Zhao
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All:

I have a simple test GUI that has 2 panels (a top and a bottom),
the top panel has three components which are two Jcomboxs and one JSlider. I use GridBagLayout for the top panel. The JSlider has a fixed size by using the Dimension() function.

The bottom is an application plotting. I would think that when the GUI is launched, the full image fills the whole bottom panel height with a default zoom level of 1.0.
So my question is:
Can I define the top panel's height, then get the bottom panel's height?

therefore the bottom panel's height is

Thanks
 
Hui Zhao
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am asking the question is because I found a partial bottom of the application is cut off even the maximum value of vertial coordinate is equal to the height of the bottom plane.
why?
 
Hui Zhao
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is an executable SSCEE code.

From the printout result, we see the bottom Jplane size is 745 by 745.
But the path has a vertex at (250,745), which can not be displayed.
Eventhough I replaced it with (250,740) whose vertial coordinate is less than the height of the bottom Jplane.
 
Hui Zhao
Ranch Hand
Posts: 116
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get it, post closed.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic