I have the following code to call a new frame from a button:
final JButton btnFontHelp = new JButton("Font Help");
btnFontHelp.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Framefont fr = new Framefont();
fr.setBounds(100, 150, 400, 170);
fr.setVisible(true);
}
});
The fr.setBounds(100, 150) is absolute position based on the screen and not based on the mainframe. Is there any way to know the absolute position of the main screen, so that the child frame can appear at a certain position based on the mainsframe and not based on the position of the screen?