package 서준혁230910.src;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Main extends JFrame
{
JLabel number=new JLabel();
JLabel number1=new JLabel();
JLabel number2=new JLabel();
JLabel number3=new JLabel();
JLabel number4=new JLabel();
JLabel number5=new JLabel();
JLabel number6=new JLabel();
JLabel number7=new JLabel();
JLabel number8=new JLabel();
JButton okay= new JButton("확인");
ImageIcon StartBackgroundIcon = new ImageIcon("image/방탈출 시작화면.png");
int yes=0;
ImageIcon DecidedifficultyIcon = new ImageIcon("image/방탈출 난이도 선택.png");
ImageIcon drawer=new ImageIcon("image/서랍.png");
ImageIcon odrawer=new ImageIcon("image/열린 서랍.png");
ImageIcon brokeread=new ImageIcon("image/부숴진 인도자.png");
JLabel brokereadl=new JLabel(brokeread);
ImageIcon see = new ImageIcon("image/돋보기.png");
JLabel drawerlabel=new JLabel(drawer);
ImageIcon readend = new ImageIcon("image/칼날이 이끄는 곳.png");
JLabel readendl=new JLabel(readend);
int upofx=1556;
JLabel watch= new JLabel(see);
ImageIcon x=new ImageIcon("image/뒤로가기.png");
JLabel xlabel=new JLabel(x);
int drawpass=0;
int drawpass1=0;
int drawpass2=0;
int drawpass3=0;
int drawpass4=0;
int drawpass5=0;
int drawpass6=0;
int drawpass7=0;
int drawpass8=0;
int drwo=0;
int stage=0;
ImageIcon lock=new ImageIcon("image/자물쇠.png");
JLabel locklabel=new JLabel(lock);
ImageIcon StartIcon = new ImageIcon("image/방탈출 시작버튼.png");
ImageIcon DecideIcon = new ImageIcon("image/a.png");
ImageIcon [] MapImage= {new ImageIcon("image/tt의 방.png"),new ImageIcon("image/기사 박물관.png"),new ImageIcon("image/물음표.png") };
ImageIcon mail=new ImageIcon("image/기사의 편지.png");
JLabel maillabe=new JLabel(mail);
JRadioButton [] Map=new JRadioButton[3];
JLabel DecidedifficultyImageLabel=new JLabel(DecidedifficultyIcon);
JPanel DecidedifficultyPanel=new JPanel();
JButton StartImageButton=new JButton(StartIcon);
JButton DecideImageButton=new JButton(DecideIcon);
JFrame f=new JFrame();
JFrame f1=new JFrame();
JFrame f2=new JFrame();
JPanel BackgroundPanel=new JPanel();
JLabel StartBackgroundImageLabel=new JLabel(StartBackgroundIcon);
Container c=getContentPane();
Main()
{
f.setTitle("준혁준혁 방탈출");
f.setResizable(false);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add(c);
c.setLayout(null);
StartImageButton.setSize(200, 100);
StartImageButton.setVisible(true);
StartImageButton.setLocation(780, 360);
c.add(StartImageButton);
StartImageButton.addMouseListener(new MyMouseListener());
BackgroundPanel.setSize(1900, 1000);
BackgroundPanel.setVisible(true);
BackgroundPanel.add(StartBackgroundImageLabel);
c.add(BackgroundPanel);
f.setVisible(true);
f.setSize(1900,1000);
}
class MyMouseListener extends MouseAdapter
{
public void mouseClicked(MouseEvent e) {
StartImageButton.removeAll();
BackgroundPanel.removeAll();
c.removeAll();
f.setVisible(false);
ButtonGroup g=new ButtonGroup();
f1.setVisible(true);
f1.setSize(1900, 1000);
f1.setResizable(false);
f1.setLocationRelativeTo(null);
f1.setTitle("난이도 정하기");
f1.add(DecidedifficultyPanel);
for( int i=0;i<3;i++)
{
Map[i]=new JRadioButton();
Map[i].setIcon(MapImage[i]);
Map[i].addItemListener(new MyItemListener());
Map[i].setVisible(true);
}
DecidedifficultyPanel.setSize(1900, 1000);
DecidedifficultyPanel.setVisible(true);
DecidedifficultyPanel.add(Map[1]);
DecidedifficultyPanel.add(Map[2]);
DecidedifficultyPanel.add(Map[0]);
DecidedifficultyPanel.add(DecideImageButton);
DecidedifficultyPanel.add(DecidedifficultyImageLabel);
DecidedifficultyImageLabel.setSize(1900, 1000);
DecidedifficultyImageLabel.setVisible(true);
DecidedifficultyPanel.setLayout(null);
DecideImageButton.setSize(193, 100);
DecideImageButton.setVisible(false);
DecideImageButton.setLocation(800,700);
DecideImageButton.setOpaque(true);
g.add(Map[0]);
g.add(Map[1]);
g.add(Map[2]);
Map[0].setBorderPainted(true);
Map[0].setVisible(true);
Map[0].setSize(180,250);
Map[1].setBorderPainted(true);
Map[1].setVisible(true);
Map[1].setSize(180, 250);
Map[2].setBorderPainted(true);
Map[2].setVisible(true);
Map[2].setSize(180, 250);
Map[0].setLocation(150, 290);
Map[1].setLocation(790, 290);
Map[2].setLocation(1370, 290);
DecideImageButton.addMouseListener(new MyMouse1Listener());
}
class MyMouse1Listener extends MouseAdapter{
ImageIcon diary=new ImageIcon("image/tt의 일기.png");
JLabel diarylabel=new JLabel(diary);
ImageIcon endmail=new ImageIcon("image/도착지가 물음표 편지.png");
JLabel endmaill=new JLabel(endmail);
ImageIcon endingmail=new ImageIcon("image/물음표로 이끄는 편지.png");
JLabel endingmaill=new JLabel(endingmail);
int colorof1=0;
int colorof2=0;
int colorof3=0;
ImageIcon [] StageImage= {new ImageIcon("image/tt의 방1.png"),new ImageIcon("image/기사들의 식당.png"),new ImageIcon("image/물음표.png") };
ImageIcon [] safeColor= {new ImageIcon("image/1금고 흰색.png"),new ImageIcon("image/1금고 하늘색.png"),new ImageIcon("image/1금고 빨간색.png"),new ImageIcon("image/1금고 파란색.png") };
ImageIcon Dlaweroftt=new ImageIcon("image/tt의 서랍.png");
ImageIcon safe1=new ImageIcon("image/tt의 열린 금고.png");
JLabel Dlaweroflabeltt=new JLabel(Dlaweroftt);
ImageIcon Dlaweroftt1=new ImageIcon("image/tt의 열린 서랍.png");
JLabel Dlaweroflabeltt1=new JLabel(Dlaweroftt1);
JLabel stage1= new JLabel();
int badmo=0;
int upofy=570;
ImageIcon up=new ImageIcon("image/위로.png");
JLabel uplabel=new JLabel(up);
int swichon=0;
JLabel uplabel1=new JLabel(up);
JLabel uplabel2=new JLabel(up);
int dooropen=0;
ImageIcon ttofmail=new ImageIcon("image/tt의 편지.png");
JLabel ttofmaillabel=new JLabel(ttofmail);
ImageIcon ttandorder=new ImageIcon("image/tt와 기사단.png");
JLabel ttandorderl=new JLabel(ttandorder);
ImageIcon ttdoor=new ImageIcon("image/tt의 집 현관문.png");
JLabel ttdoorlabel=new JLabel(ttdoor);
ImageIcon safe=new ImageIcon("image/tt의 방 금고.png");
JLabel safelabel=new JLabel(safe);
ImageIcon psw=new ImageIcon("image/tt의 방 비밀번호.png");
JLabel pswlabel=new JLabel(psw);
ImageIcon swich=new ImageIcon("image/스위치.png");
JLabel swichlabel=new JLabel(swich);
ImageIcon bed=new ImageIcon("image/tt의 침대.png");
JLabel ttofbad=new JLabel(bed);
ImageIcon safemail=new ImageIcon("image/tt의 금고 편지.png");
JLabel safemaill=new JLabel(safemail);
JLabel safenumber=new JLabel(safeColor[0]);
JLabel safenumber1=new JLabel(safeColor[0]);
JLabel safenumber2=new JLabel(safeColor[0]);
JTextField pasw=new JTextField(10);
ImageIcon darktt=new ImageIcon("image/tt의 어두운 방.png");
private void set(JLabel up) {
up.setVisible(true);
up.setOpaque(true);
up.setSize(23, 18);
up.setLocation(upofx, upofy);
}
private void del() {
uplabel.setVisible(false);
uplabel1.setVisible(false);
uplabel2.setVisible(false);
safenumber.setVisible(false);
safenumber1.setVisible(false);
safenumber2.setVisible(false);
safemaill.setVisible(true);
safemaill.setOpaque(true);
safemaill.setLocation(1260,500);
safemaill.setSize(111,154);
safemaill.addMouseListener(new Myreadordermail());
safelabel.setLocation(1160, 460);
safelabel.setIcon(safe1);
safelabel.setSize(587,345);
safelabel.setLocation(1160, 460);
}
public void mouseClicked(MouseEvent e) {
xlabel.addMouseListener(new xListener());
f1.setVisible(false);
f2.setVisible(true);
f2.setSize(1900, 1000);
f2.setLocationRelativeTo(null);
f2.setResizable(false);
if(stage==1)
{
f2.setTitle("tt의 방");
f2.setLayout(null);
stage1.setIcon(StageImage[0]);
stage1.add(ttandorderl);
stage1.add(diarylabel);
stage1.add(xlabel);
stage1.add(ttofmaillabel);
stage1.add(safemaill);
stage1.add(Dlaweroflabeltt);
stage1.add(Dlaweroflabeltt1);
stage1.add(ttdoorlabel);
stage1.add(uplabel);
stage1.add(uplabel1);
stage1.add(uplabel2);
stage1.add(safenumber);
stage1.add(safenumber1);
stage1.add(safenumber2);
stage1.add(safelabel);
set(uplabel);
upofx=upofx+71;
set(uplabel1);
upofx=upofx+71;
set(uplabel2);
upofy=upofy+20;
upofx=upofx-142;
set(safenumber);
upofx=upofx+71;
set(safenumber1);
upofx=upofx+71;
set(safenumber2);
uplabel.addMouseListener(new MyColor1Change());
uplabel1.addMouseListener(new MyColor2Change());
uplabel2.addMouseListener(new MyColor3Change());
safelabel.setVisible(true);
stage1.add(pasw);
pasw.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("1");
if(pasw.getText().equals("0707")) System.exit(0);
}
});
ttdoorlabel.setSize(221,340);
ttdoorlabel.setOpaque(true);
ttdoorlabel.setVisible(true);
ttdoorlabel.setLocation(1500,2);
ttdoorlabel.addMouseListener(new Opendoor());
stage1.add(pswlabel);
stage1.add(ttofbad);
stage1.add(swichlabel);
swichlabel.setSize(15,11);
swichlabel.setVisible(true);
swichlabel.setOpaque(true);
swichlabel.setLocation(334, 491);
swichlabel.addMouseListener(new Myswichon());
ttofbad.setVisible(true);
ttofbad.setOpaque(true);
ttofbad.setSize(334,391);
ttofbad.setLocation(100,400);
ttofbad.addMouseListener(new badmove());
safelabel.setLocation(1500, 460);
safelabel.setSize(300, 300);
safelabel.setOpaque(true);
Dlaweroflabeltt.setOpaque(true);
Dlaweroflabeltt.setVisible(true);
Dlaweroflabeltt.setSize(245, 204);
Dlaweroflabeltt.setLocation(500, 360);
Dlaweroflabeltt.addMouseListener(new MyttofDlawerListener());
stage1.setSize(1900, 1000);
stage1.setVisible(true);
stage1.setOpaque(true);
f2.add(stage1);
}
else if(stage==2)
{
f2.setTitle("기사들의 식당");
stage1.setIcon(StageImage[1]);
stage1.setSize(1900, 1000);
stage1.setVisible(true);
stage1.setOpaque(true);
stage1.add(endingmaill);
stage1.add(maillabe);
stage1.add(xlabel);
stage1.add(watch);
stage1.add(okay);
okay.addMouseListener(new OkayListener());
stage1.add(number);
stage1.add(number1);
stage1.add(number2);
stage1.add(number3);
stage1.add(number4);
stage1.add(number5);
stage1.add(number6);
stage1.add(number7);
stage1.add(number8);
stage1.add(locklabel);
stage1.add(endmaill);
stage1.add(drawerlabel);
stage1.add(readendl);
f2.add(stage1);
watch.setSize(100, 100);
watch.setLocation(400, 370);
watch.setVisible(true);
watch.addMouseListener(new seeListener());
watch.setOpaque(true);
drawerlabel.setSize(99, 341);
drawerlabel.setLocation(1740, 570);
drawerlabel.addMouseListener(new solveListener());
drawerlabel.setVisible(true);
drawerlabel.setOpaque(true);
}
else if(stage==3)
{
f2.setTitle("???");
}
}
class badmove extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
if(badmo==1)
{
ttofbad.setLocation(100,600);
}
}
}
class Opendoor extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
if(dooropen==0)
{
dooropen=1;
pasw.setVisible(true);
pasw.setLocation(900, 400);
pasw.setSize(100, 50);
}
else
{
pasw.setVisible(false);
dooropen=0;
}
}
}
class Myswichon extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
if(swichon==0)
{
swichon=1;
stage1.setIcon(darktt);
pswlabel.setLocation(900, 100);
pswlabel.setSize(231,111);
pswlabel.setVisible(true);
pswlabel.setOpaque(true);
}
else if(swichon==1)
{
swichon=0;
stage1.setIcon(StageImage[0]);
pswlabel.setVisible(false);
}
}
}
class MyColor1Change extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
colorof1++;
if(colorof1==4)
{
colorof1=0;
}
safenumber.setIcon(safeColor[colorof1]);
if(colorof1==2)
{
if(colorof2==1)
{
if(colorof3==3)
{
del();
}
}
}
}
}
class Myreadordermail extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
badmo=1;
ttandorderl.setSize(800, 800);
ttandorderl.setVisible(true);
ttandorderl.setOpaque(true);
ttandorderl.setLocation(500, 100);
xlabel.setLocation(0, 0);
xlabel.setSize(1900, 1000);
xlabel.setOpaque(true);
xlabel.setVisible(true);
ttdoorlabel.setVisible(true);
xlabel.addMouseListener(new x1Listener());
}
class x1Listener extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
ttandorderl.setVisible(false);
xlabel.setVisible(false);
}
}
}
class MyColor2Change extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
colorof2++;
if(colorof2==4)
{
colorof2=0;
}
safenumber1.setIcon(safeColor[colorof2]);
if(colorof1==2)
{
if(colorof2==1)
{
if(colorof3==3)
{
del();
}
}
}
}
}
class MyColor3Change extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
colorof3++;
if(colorof3==4)
{
colorof3=0;
}
safenumber2.setIcon(safeColor[colorof3]);
if(colorof1==2)
{
if(colorof2==1)
{
if(colorof3==3)
{
del();
}
}
}
}
}
class MyttofDlawerListener extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
Dlaweroflabeltt.setVisible(false);
Dlaweroflabeltt1.setOpaque(true);
Dlaweroflabeltt1.setVisible(true);
Dlaweroflabeltt1.setSize(244, 221);
Dlaweroflabeltt1.setLocation(500, 360);
ttofmaillabel.setSize(56, 38);
ttofmaillabel.setOpaque(true);
ttofmaillabel.setVisible(true);
ttofmaillabel.setLocation(610, 473);
ttofmaillabel.addMouseListener(new Myttofmail());
}
class Myttofmail extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
diarylabel.setVisible(true);
diarylabel.setSize(800, 800);
diarylabel.setLocation(500, 100);
xlabel.setLocation(0, 0);
xlabel.setSize(1900, 1000);
xlabel.setOpaque(true);
xlabel.setVisible(true);
xlabel.addMouseListener(new xListener());
}
class xListener extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
diarylabel.setVisible(false);
xlabel.setVisible(false);
}
}
}
}
class solveListener extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
int x=620;
if(drwo==0&&drwo!=2)
{
locklabel.setSize(900, 340);
locklabel.setLocation(610, 370);
locklabel.setVisible(true);
locklabel.setOpaque(true);
okay.setSize(100, 70);
okay.setLocation(1010, 670);
okay.setVisible(true);
okay.setOpaque(true);
settting(x,number);
x=x+100;
settting(x,number1);
x=x+100;
settting(x,number2);
x=x+100;
settting(x,number3);
x=x+100;
settting(x,number4);
x=x+100;
settting(x,number5);
x=x+100;
settting(x,number6);
x=x+100;
settting(x,number7);
x=x+100;
settting(x,number8);
drwo=1;
if(yes==0)
{
number.addMouseWheelListener(new MyWheelnumberListener());
number1.addMouseWheelListener(new MyWheel1numberListener());
number2.addMouseWheelListener(new MyWheel2numberListener());
number3.addMouseWheelListener(new MyWheel3numberListener());
number4.addMouseWheelListener(new MyWheel4numberListener());
number5.addMouseWheelListener(new MyWheel5numberListener());
number6.addMouseWheelListener(new MyWheel6numberListener());
number7.addMouseWheelListener(new MyWheel7numberListener());
number8.addMouseWheelListener(new MyWheel8numberListener());
yes=1;
}
}
else if(drwo==1&&drwo!=2)
{
locklabel.setVisible(false);
okay.setVisible(false);
number.setVisible(false);
number1.setVisible(false);
number2.setVisible(false);
number3.setVisible(false);
number4.setVisible(false);
number5.setVisible(false);
number6.setVisible(false);
number7.setVisible(false);
number8.setVisible(false);
drwo=0;
}
}
private void settting(int x,JLabel number) {
number.setLocation(x, 490);
number.setFont(new Font("arial",Font.BOLD,25));
number.setSize(50, 50);
number.setVisible(true);
number.setText(" 0");
number.setOpaque(true);
}
}
class MyWheelnumberListener implements MouseWheelListener
{
public void mouseWheelMoved(MouseWheelEvent e) {
if(e.getWheelRotation()<0)
{
drawpass++;
if(drawpass==10)
{
drawpass=9;
}
number.setText(" "+Integer.toString(drawpass));
}
else
{
drawpass--;
if(drawpass==-1)
{
drawpass=0;
}
number.setText(" "+Integer.toString(drawpass));
}
}
}
class MyWheel1numberListener implements MouseWheelListener
{
public void mouseWheelMoved(MouseWheelEvent e) {
if(e.getWheelRotation()<0)
{
drawpass1++;
if(drawpass1==10)
{
drawpass1=9;
}
number1.setText(" "+Integer.toString(drawpass1));
}
else
{
drawpass1--;
if(drawpass1==-1)
{
drawpass1=0;
}
number1.setText(" "+Integer.toString(drawpass1));
}
}
}
class MyWheel2numberListener implements MouseWheelListener
{
public void mouseWheelMoved(MouseWheelEvent e) {
if(e.getWheelRotation()<0)
{
drawpass2++;
if(drawpass2==10)
{
drawpass2=9;
}
number2.setText(" "+Integer.toString(drawpass2));
}
else
{
drawpass2--;
if(drawpass2==-1)
{
drawpass2=0;
}
number2.setText(" "+Integer.toString(drawpass2));
}
}
}
class MyWheel3numberListener implements MouseWheelListener
{
public void mouseWheelMoved(MouseWheelEvent e) {
if(e.getWheelRotation()<0)
{
drawpass3++;
if(drawpass3==10)
{
drawpass3=9;
}
number3.setText(" "+Integer.toString(drawpass3));
}
else
{
drawpass3--;
if(drawpass3==-1)
{
drawpass3=0;
}
number3.setText(" "+Integer.toString(drawpass3));
}
}
}
class MyWheel4numberListener implements MouseWheelListener
{
public void mouseWheelMoved(MouseWheelEvent e) {
if(e.getWheelRotation()<0)
{
drawpass4++;
if(drawpass4==10)
{
drawpass4=9;
}
number4.setText(" "+Integer.toString(drawpass4));
}
else
{
drawpass4--;
if(drawpass4==-1)
{
drawpass4=0;
}
number4.setText(" "+Integer.toString(drawpass4));
}
}
}
class MyWheel5numberListener implements MouseWheelListener
{
public void mouseWheelMoved(MouseWheelEvent e) {
if(e.getWheelRotation()<0)
{
drawpass5++;
if(drawpass5==10)
{
drawpass5=9;
}
number5.setText(" "+Integer.toString(drawpass5));
}
else
{
drawpass5--;
if(drawpass5==-1)
{
drawpass5=0;
}
number5.setText(" "+Integer.toString(drawpass5));
}
}
}
class MyWheel6numberListener implements MouseWheelListener
{
public void mouseWheelMoved(MouseWheelEvent e) {
if(e.getWheelRotation()<0)
{
drawpass6++;
if(drawpass6==10)
{
drawpass6=9;
}
number6.setText(" "+Integer.toString(drawpass6));
}
else
{
drawpass6--;
if(drawpass6==-1)
{
drawpass6=0;
}
number6.setText(" "+Integer.toString(drawpass6));
}
}
}
class MyWheel7numberListener implements MouseWheelListener
{
public void mouseWheelMoved(MouseWheelEvent e) {
if(e.getWheelRotation()<0)
{
drawpass7++;
if(drawpass7==10)
{
drawpass7=9;
}
number7.setText(" "+Integer.toString(drawpass7));
}
else
{
drawpass7--;
if(drawpass7==-1)
{
drawpass7=0;
}
number7.setText(" "+Integer.toString(drawpass7));
}
}
}
class MyWheel8numberListener implements MouseWheelListener
{
public void mouseWheelMoved(MouseWheelEvent e) {
if(e.getWheelRotation()<0)
{
drawpass8++;
if(drawpass8==10)
{
drawpass8=9;
}
number8.setText(" "+Integer.toString(drawpass8));
}
else
{
drawpass8--;
if(drawpass8==-1)
{
drawpass8=0;
}
number8.setText(" "+Integer.toString(drawpass8));
}
}
}
class OkayListener extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
int rightanswer=227101851;
String str=Integer.toString(drawpass)+Integer.toString(drawpass1)+Integer.toString(drawpass2)+Integer.toString(drawpass3)+Integer.toString(drawpass4)+Integer.toString(drawpass5)+Integer.toString(drawpass6)+Integer.toString(drawpass7)+Integer.toString(drawpass8);
if(str.equals(Integer.toString(rightanswer)))
{
locklabel.setVisible(false);
okay.setVisible(false);
number.setVisible(false);
number1.setVisible(false);
number2.setVisible(false);
number3.setVisible(false);
number4.setVisible(false);
number5.setVisible(false);
number6.setVisible(false);
number7.setVisible(false);
number8.setVisible(false);
drwo=2;
drawerlabel.setIcon(odrawer);
drawerlabel.setSize(101, 374);
endmaill.setSize(32,38);
endmaill.setVisible(true);
endmaill.setOpaque(true);
endmaill.setLocation(1750, 800);
endmaill.addMouseListener(new endingListener());
readendl.setSize(55,79);
readendl.setVisible(true);
readendl.setLocation(1170, 30);
readendl.setOpaque(true);
readendl.addMouseListener(new readending());
}
}
class readending extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
readendl.setIcon(brokeread);
readendl.addMouseListener(new Myinto());
}
class Myinto extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
System.out.println("1");
}
}
}
class endingListener extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
endingmaill.setSize(800,800);
endingmaill.setVisible(true);
endingmaill.setOpaque(true);
endingmaill.setLocation(400, 100);
xlabel.setVisible(true);
xlabel.setLocation(0, 0);
xlabel.setSize(1900, 1000);
xlabel.setOpaque(true);
xlabel.addMouseListener(new Myclose());
}
class Myclose extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
endingmaill.setVisible(false);
xlabel.setVisible(false);
}
}
}
}
}
class xListener extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
xlabel.setVisible(false);
maillabe.setVisible(false);
}
}
class seeListener extends MouseAdapter
{
public void mousePressed(MouseEvent e) {
xlabel.setVisible(true);
maillabe.setVisible(true);
maillabe.setLocation(400, 100);
maillabe.setSize(800, 800);
maillabe.setOpaque(true);
xlabel.setLocation(0, 0);
xlabel.setSize(1900, 1000);
xlabel.setOpaque(true);
}
}
}
class MyItemListener implements ItemListener
{
public void itemStateChanged(ItemEvent e) {
DecideImageButton.setVisible(true);
if(e.getItemSelectable()==Map[0])
{
stage=1;
}
else if(e.getItemSelectable()==Map[1])
{
stage=2;
}
else if(e.getItemSelectable()==Map[2])
{
stage=3;
}
}
}
public static void main(String[] args) {
new Main();
}
}