일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- javascript
- MS-SQL
- 자바스크립트
- 컬럼명
- Android
- Redirect
- varags
- Apache Lucene
- Bootstrap
- Maven
- asp.net
- scrollView
- Web Service
- C#
- 안드로이드
- 이클립스
- Java
- Eclipse
- MSsql
- WebView
- decompiler
- MANTIS
- 웹뷰
- jsp
- html
- 웹 서비스
- STS
- TextBox
- SpringSource Tool Suite
- 자바
- Today
- Total
목록Java/Java (36)
bboks.net™
import javax.swing.*; import java.awt.GridLayout; import java.awt.event.*; public class CompValidateExample extends JFrame implements ActionListener { JButton b = null; JLabel l = null; public CompValidateExample() { this.setLayout(new GridLayout(1,3)); b = new JButton("Show Label"); b.addActionListener(this); this.add(b); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setSize(300, 100); thi..
import javax.swing.*; import java.awt.GridLayout; import java.awt.event.*; public class CompValidateExample extends JFrame implements ActionListener { JButton b = null; JLabel l = null; public CompValidateExample() { this.setLayout(new GridLayout(1,3)); b = new JButton("Show Label"); b.addActionListener(this); this.add(b); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setSize(300, 100); thi..
public BufferedImage toBufferedImage(Image input) { if (input instanceof BufferedImage) return (BufferedImage) input; if (input instanceof VolatileImage) return ((VolatileImage)input).getSnapshot(); //too lazy to use MediaTracker directly: ImageIcon imageIcon = new ImageIcon(input); if (imageIcon.getImageLoadStatus() != MediaTracker.COMPLETE) throw new IllegalArgumentException("Can't load image"..
자바에서는 기본적으로 창의 X 표시를 눌러도 창만 사라질뿐 프로세스 자체는 죽지 않는다. 프로세스를 닫기 위해서는 이벤트를 추가해줘야 하는데 Java AWT 의 경우 생성자에 다음을 추가해주면 된다. addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { dispose(); System.exit(0); } }); Java SWING의 경우 하나의 방법이 더 있는데 클래스가 JFrame을 상속 받았을 경우 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);