pablosotol

Microondas

Aug 16th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.06 KB | None | 0 0
  1. import java.awt.*;
  2. import javax.swing.*;
  3.  
  4. public class Gui04 extends JFrame{
  5.    
  6.        public Gui04(){
  7.               setTitle("Horno microondas");
  8.               setDefaultCloseOperatiion(JFrame.EXIT_ON_CLOSE);
  9.               setLayout(new BorderLayout());
  10.  
  11.               JPanel p1=new JPanel();
  12.               p1.setLayout(new GridLayout(4,3);
  13.               for(int i=1;i<=9;i++){
  14.                   p1.add(new JButton("" +i));
  15.               }
  16.  
  17.               p1.add(new JButton("" +0));
  18.               p1.add(new JButton("Start");
  19.               p1.add(new JButton("Stop");
  20.  
  21.               JPanel p2=new JPanel();
  22.               p2.setLayout(new BorderLayout());
  23.               p2.add(new JTextField("Aquí el tiempo"),BorderLayout.NORTH);
  24.               p2.add(p1.BorderLayout.CENTER);
  25.               add(p2,BorderLayout.EAST);
  26.               add(new Button("Aquí la comida"),BorderLayout.CENTER;
  27.               setSize(400,250);
  28.               setVisible(true);
  29.  
  30.               public static void main(String [] args){
  31.                      Gui04 gui=new Gui04();
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment