File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Mac OS and the fly likes JDialog: position, focus Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "JDialog: position, focus" Watch "JDialog: position, focus" New topic

JDialog: position, focus

Branko Paskutini

Joined: Apr 18, 2002
Posts: 25
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


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

Joined: Jun 06, 2002
Posts: 1056
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.

Ron Newman - SCJP 1.2 (100%, 7 August 2002)
I agree. Here's the link:
subject: JDialog: position, focus
It's not a secret anymore!