Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI is messed up in sun Solaris

 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I run my app on Sun Solaris machine, some of the components are displaced and pnemonics don't work.
Has anybody experienced this problem ??
 
reena kadam
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That should not happen. mine worked as it is. It hasd to work as java is platform independent. Ofcourse, if your layout manager are not proper, then because of different resolution on different OS setting etc, u may get different result.
What is your layout like ? how many panels are on outermost window (frame)? is your appliication is working while resizing it ?
check all that first. i think u can find your mistake.
 
Arvind.Popli
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah Rasika,
I have the same problem. Under NT/2000 mnemonics work ok but in Sun Solaris they do not. I guess coz in Unix the HOT Key combination is different.
-Arvind

 
Gennady Shapiro
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your components might be misplaced because of different screen resolution of your Sun terminal. This happened to me when I was using awt layouts and tested my client with different resolutions.
It has nothing to do with Solaris though.
P.S. I am using Swing's BoxLayout where possible, it's more rigid in terms of component location.
 
Rasika Chitnis
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for your replies.
Gennady, I too am using swing BorderLayout and GrigBagLayout. I am not using AWT layouts.
Arvind, do you know how to find out what is the hot key combination on unix ?
thanks
 
Arvind.Popli
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rasika,
I did not try to make the HOT key combinations work in UNIX. I submitted the assignment as is it. Not worth the effort, I guess. As long as the project works fine with all the functionality, it is fine.
-Arvind
 
Gennady Shapiro
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rasika,
your layouts are in fact provided by java.awt package and they are "older"-style layouts. The problem with them is that almost impossible to cleanly layout components with strictly defined horizontal and vertical gaps between them (as Sun's Java L&F Guidelines suggest), plus these layouts are very violent when it comes to resizing windows -- they move components at their discretion.
The BoxLayout is preffered Swing layout, it can be much more rigid and you have more control over how to place and space components.
[This message has been edited by Gennady Shapiro (edited November 28, 2001).]
 
Peter Crowley
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have experienced similar problems such as this when using GridBagLayout in some GUIs I have developed on different projects I have worked on. I finally stopped using it because it was so difficult to bebug on all the different platforms. Now I stick to using javax.swing.JPanel with GridLayout, BoxLayout, and BorderLayout. These seem to live up to the promise of platform independance.
-Peter Crowley
 
nitin kanaskar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<pre>
what are hot key combinations ?
anybody please.
thanx in anticipation
</pre>
 
Peter Crowley
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by nitin kanaskar:

what are hot key combinations ?

Using hot keys an pnemonics are, IMHO, way too complicated for this project. They are not part of the requirements and tend to make your GUI much too complicated, thereby actually costing you points.
Hot Keys are keyboard strokes that are mapped to Gui Components. For example your browser probably has a menu with "File" or "Edit". If you press ALT-F, it will do the same thing as selecting "File" from the menu. This is a hot key.
-Peter Crowley
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic