Playlist
• Java Frontend
2023 05 21 03 34 21
import java.awt.Color;
import java.awt.HeadlessException;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLayeredPane;
public class layeredpane extends JFrame {
public layeredpane() throws HeadlessException {
super("Example of LayeredPane");
setSize(300, 300);
JLayeredPane panel1 = getLayeredPane();
JButton Press = new JButton();
Press.setBackground(Color.red);
Press.setBounds(30, 30, 60, 60);
JButton middlestate = new JButton();
middlestate.setBackground(Color.white);
middlestate.setBounds(50, 50, 60, 60);
JButton bottomstate = new JButton();
bottomstate.setBackground(Color.cyan);
bottomstate.setBounds(70, 70, 60, 60);
//adding buttons to the pane
panel1.add(bottomstate, new Integer(3));
panel1.add(middlestate, new Integer(1));
panel1.add(Press, new Integer(2));
}
public static void main(String[] args) {
layeredpane p = new layeredpane();
p.setVisible(true);
p.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
In questa pagina del sito puoi guardare il video online Java Swing: JLayeredPane della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Le Hoang Long Long 21 maggio 2023, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 387 volte e gli è piaciuto 2 spettatori. Buona visione!