Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems in Solaris Platform testing .

 
Zhou Can
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello , everybody . I meet this problem when i test my assignment in Solaris platform :
1: the position is not set as what i want .
2: the components is black after some other program in front of it .
But , these problems have not appeared in Windows palteform . Could u tell me why . Thanks .
BTW , this is my codes to show the JDialog :
class MyDialog extends JDialog{
...
...
public void showDialog(){
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
}
setLocation((screenSize.width - frameSize.width)/2, (screenSize.height - frameSize.height)/2);

SwingUtilities.invokeLater(new Runnable(){
public void run(){
toFront();
}
});
pack();
repaint();
setVisible(true);
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic