|
下記のようなGUIを作ったんですが、eclipseで実行する とサイズ設定してないのと同じ状態でタイトル表示部 (タイトルは表示されませんが・・・)のみとなります。 コンストラクタ内にsetVisibleを移すと問題ありませ ん。どなたかわかりますか?よろしくお願いします。
import javax.swing.JFrame;
public class Test{ public static void main(String[] args) { Frameother fo=new Frameother(); fo.setVisible(true); }
}
class Frameother extends JFrame{ JFrame frame; Frameother(){ frame=new JFrame("title"); frame.setSize(200, 200); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E); } }
|