JOptionPane
ボタンをクリックすると、全画面表示に設定されているアプリケーションがタスクバー/最小化に移動するため、トリガーしたアプリケーションを表示する前に、タスクバーで最初にクリックする必要があります。これの何が問題だと思いますか?最小化したり、タスクバーに移動したりせずにスムーズに実行したいと思います。
public static void main(String[] args) {
final JFrame frame = new JFrame();
frame.setTitle("Sample");
GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
device.setFullScreenWindow(frame);
device.setDisplayMode(new DisplayMode(800, 600, 32, 60));
frame.setVisible(true);
JButton btn = new JButton();
btn.setText("Btn");
JPanel panel = new JPanel();
panel.add(btn);
frame.add(panel);
btn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(frame, "Sample");
throw new UnsupportedOperationException("Not supported yet.");
}
});
}