2
I learned that to center a component in the center of the screen just use:
frame.setLocationRelativeTo(null);
But how do I show the component on top of the Windows clock independent of the screen size?
In my case my code is like this:
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
UIManager.setLookAndFeel("com.jtattoo.plaf.graphite.GraphiteLookAndFeel");
mainn frame = new mainn();
frame.setLocationRelativeTo(null);
frame.setResizable(false);
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
I use the Window Builder of my IDE.
Solved! I just can’t score. Thank you!
– kholyphoenix1
Renan. Thank you very much champion!
– kholyphoenix1
Entnedi. Excuse the ignorance kkk.. Thank you!
– kholyphoenix1