• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

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.
 
Trust God, but always tether your camel... to this tiny ad.
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!