私は最近 Java の学習を始めましたが、現在問題に直面しています。if ステートメントが完了すると、別のクラスの JFrame がポップアップするようにします。
だから私はこのようなものが欲しい:
if(...)
{
//open the JFrame from the other class
}
私の JFrame クラスは次のようになります。
import javax.swing.*;
public class Game {
public static Display f = new Display();
public static int w = 600;
public static int h = 400;
public static void main(String args[])
{
f.setSize(w, h);
f.setResizable(true);
f.setVisible(true);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setTitle("Frame Test");
}
}
class Display extends JFrame
{
}