This week's book giveaway is in the General Computing forum.
We're giving away four copies of Learning Regular Expressions and have Ben Forta on-line!
See this thread for details.
Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Components size  RSS feed

 
Ranch Hand
Posts: 116
  • 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
  • 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get it, post closed.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!