top of page

소스 코드 제출

공개·회원 50명

2025 05 25 Goodbye!

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;


public class Main extends JFrame {


private JLabel [] la = new JLabel[10];


public Main() {

setTitle("Ten 레이블 클릭");

setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

Container c = getContentPane();

c.setLayout(null);


for(int i=0;i<10;i++) {

la[i] = new JLabel(Integer.toString(i));

la[i].setSize(50, 50);

int x = (int)(Math.random()*230)+30;

int y = (int)(Math.random()*230)+30;

la[i].setLocation(x,y);

c.add(la[i]);

}

setSize(300,300);

setVisible(true);

}


private class MyActionListener implements ActionListener {

public void actionPerformed(ActionEvent e) {


}

}


public static void main(String[] args) {

new Main();

}

}




1회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page