Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit476820f

Browse files
committed
Codigo Fuente Tutorial 10 de Java
1 parent274feee commit476820f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
packagecom.applikdos;
2+
3+
importjavax.swing.*;
4+
5+
publicclassFormularioSwingextendsJFrame {
6+
JButtonbtnAceptar;
7+
JTextFieldcaja1;
8+
JLabeletiqueta;
9+
10+
publicFormularioSwing() {
11+
setVisible(true);
12+
setSize(550,250);
13+
setLayout(null);
14+
15+
etiqueta =newJLabel();
16+
etiqueta.setText("Nombre");
17+
etiqueta.setBounds(100,10,100,30);
18+
getContentPane().add(etiqueta);
19+
20+
caja1 =newJTextField();
21+
caja1.setBounds(200,10,150,30);
22+
getContentPane().add(caja1);
23+
24+
btnAceptar =newJButton();
25+
btnAceptar.setText("Aceptar");
26+
btnAceptar.setBounds(220,100,100,30);
27+
getContentPane().add(btnAceptar);
28+
29+
}
30+
31+
publicstaticvoidmain(String[]args) {
32+
newFormularioSwing();
33+
}
34+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp