본문내용
import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
public class VendingMachine extends JFrame {
private SelectPanel selectPanel;
private InputPanel inputPanel;
private OutputPanel outputPanel;
public VendingMachine(){
super("음료수 자동판매기");
Container container = getContentPane();
container.setLayout(null);
selectPanel = new SelectPanel();
selectPanel.setBackground(Color.gray);
inputPanel = new InputPanel();
inputPanel.setBackground(Color.gray);
outputPanel = new OutputPanel();
outputPanel.setBackground(Color.gray);
selectPanel.setBounds(25, 0, 450, 200);
container.add(selectPanel);
inputPanel.setBounds(25,230,450,200);
container.add(inputPanel);
outputPanel.setBounds(25,460,450,200);
container.add(outputPanel);
setSize(500,700);
setVisible(true);
}
public static void main(String args[]){
VendingMachine vm= new VendingMachine();
vm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
import java.awt.*;
import java.util.*;
import java.awt.event.*;
public class VendingMachine extends JFrame {
private SelectPanel selectPanel;
private InputPanel inputPanel;
private OutputPanel outputPanel;
public VendingMachine(){
super("음료수 자동판매기");
Container container = getContentPane();
container.setLayout(null);
selectPanel = new SelectPanel();
selectPanel.setBackground(Color.gray);
inputPanel = new InputPanel();
inputPanel.setBackground(Color.gray);
outputPanel = new OutputPanel();
outputPanel.setBackground(Color.gray);
selectPanel.setBounds(25, 0, 450, 200);
container.add(selectPanel);
inputPanel.setBounds(25,230,450,200);
container.add(inputPanel);
outputPanel.setBounds(25,460,450,200);
container.add(outputPanel);
setSize(500,700);
setVisible(true);
}
public static void main(String args[]){
VendingMachine vm= new VendingMachine();
vm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
소개글