Page 806 - 2
P. 806

menubar.setBounds(0, 0, 1280, 25);
                    menubar.addMouseListener(new MouseAdapter() {
                            public void mousePressed(MouseEvent e) {
                                    mouseX = e.getX();
                                    mouseY = e.getY();
                            }
                    });
                    menubar.addMouseMotionListener(new MouseAdapter() {
                            public void mouseDragged(MouseEvent e) {
                                    int x = e.getXOnScreen();
                                    int y = e.getYOnScreen();
                                    setLocation(x - mouseX, y - mouseY);
                            }
                    });
                    add(menubar);
            }
            public void paint(Graphics g) {
                    screenImage = createImage(Main.SCREEN_WIDTH, Main.SCREEN_HEIGHT);
                    screenGraphic = screenImage.getGraphics();
                    screenDraw((Graphics2D) screenGraphic);
                    g.drawImage(screenImage, 0, 0, null);
            }
            public void screenDraw(Graphics2D g) {
                    이미지그려주는 코드
                    paintComponents(g);
                    try {
                            Thread.sleep(5);
                    } catch (Exception e) {
                            e.printStackTrace();
                    }
                    this.repaint();
            }
            public void musicbaroff() {
                    MusicBarbutton1.setVisible(false);
                    MusicBarbutton2.setVisible(false);
                    MusicBarbutton3.setVisible(false);
                    MusicBarbutton4.setVisible(false);
                    Rightbutton.setVisible(false);
                    Leftbutton.setVisible(false);
                    easyButton.setVisible(false);
                    hardButton.setVisible(false);
            }
            public void selectTrack(int nowselected) {
                                        if (selectedMusic != null)


                                                         - 806 -
   801   802   803   804   805   806   807   808   809   810   811