import java.awt.*;
import java.awt.event.*;
import java.awt.Toolkit;
public class Keyboard extends Frame {
TextArea ta;
Button[] btn = new Button[30];
String[] key = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K",
"L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X",
"Y", "Z", "Enter", "Lower", "Upper" };
Keyboard() {
super("키보드");
setLayout(new FlowLayout());
// setLayout( new GridLayout(3, 9));
upgrade();
for (int i = 0; i < key.length; i++) {
add(btn[i] = new Button(key[i]));
}
btn[26].setActionCommand("\n"); // \n으로 뉴라인 캐릭터
btn[27].setActionCommand(bx.getText().toUpperCase());
repair();
setSize(290, 230);
setVisible(true);
end();
}
btn[27].setActionCommand(bx.getText().toUpperCase()); 이게 Lower인데
눌렀을때 toUpperCase 실행하려면 어케해야하냐? awt 첫주차인데 폭탄처럼 쏟아져나오니 뭔지 잘 몰겠음
힌트줄게 레이아웃에
해답이있다
아주 포괄적이시네