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

JDialog: position, focus

 
Branko Paskutini
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!
Mac OS X 10.2.6, Sun Java 1.3.1_03. Swing based application developed under Win2000 and Java 1.3.1, now testing it under OS X. Seem to have a major issue with objects which are extending JDialog. Worst of all, the behaviour is inconsistent, so I cannot pinpoint what is causing these problems, and have to start sentences with "sometimes, certain windows..."
1. Sometimes, certain windows are not properly displayed on the screen: JButton's, JLabel are not there at all, the window itself is almost white in colour (normally it's grey). The "workaround" is to resize the window, after that all the components are properly displayed. Here is the standard code used (loginPanel is JPanel consisting of three other panels with JButtons, JPasswordField, JLabel, etc components. "this" class extends JDialog):

2. Sometimes, certain windows are displayed in the centre of the screen, and sometimes in the top left corner. And I mean the same windows, invoked the same way. I'd like them to be centred. I tried both

and

They don't seem to make any difference.
If someone could suggest what can I do to fix these problems, or point me to the web site where Java development (or should I say deployment) is discussed in detail, that would be great.
Thanks, Branko.
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know nothing about Swing on Mac OS, but I'd strongly urge you to upgrade to Java 1.4.1 , which Apple released several months ago.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic