zオーダーでCompnentsを追加するのJLayeredPaneを使用している間、私はいくつかの問題に気づいた:のJLayeredPane zオーダーの問題
JLayeredPane lp = getLayeredPane();
JButton top = new JButton(); ...
JButton middle = new JButton(); ...
JButton bottom = new JButton(); ...
が悪い作品:
lp.add(top,2);
lp.add(middle,1);
lp.add(bottom,3);
は良い作品:
lp.add(top,new Integer(2));
lp.add(middle,new Integer(1));
lp.add(bottom,new Integer(3));
ここにあなたの見た目を見ることができます:http://i.imgur.com/eqH2El8.png
リテラル定数がIntegerオブジェクトに変換されず、正しく動作しないのはなぜですか?