• Lunes 29 de Abril de 2024, 10:54

Autor Tema:  Sintaxis de codigo!  (Leído 2244 veces)

ReflejoSepia

  • Nuevo Miembro
  • *
  • Mensajes: 2
    • Ver Perfil
Sintaxis de codigo!
« en: Martes 13 de Septiembre de 2011, 17:52 »
0
hola!
podrian proporcionarme por favor el codigo para netbeans que es para tener la aplicacion en pantalla compleeta?
es un metodo?
se que se usa el setSize() pero ya no recuerdo la sintaxis
y tambien como crear una tabla con el DefaultTableModel
no recuerdo la sintaxis! porfaaaaaaaaaaaaa  :gracias:

.net

  • Miembro MUY activo
  • ***
  • Mensajes: 181
  • Nacionalidad: mx
    • Ver Perfil
Re:Sintaxis de codigo!
« Respuesta #1 en: Jueves 15 de Septiembre de 2011, 16:56 »
0
hola!
podrian proporcionarme por favor el codigo para netbeans que es para tener la aplicacion en pantalla compleeta?
es un metodo?
se que se usa el setSize() pero ya no recuerdo la sintaxis
y tambien como crear una tabla con el DefaultTableModel
no recuerdo la sintaxis! porfaaaaaaaaaaaaa  :gracias:


Creo que te puede ayudar el siguiente Articulo:

Maximize jFrame size on startup using Netbeans IDE 5.5.1
Posted on October 2, 2007 by mrtextminer
I usally use Netbeans IDE for my Java application development. When I design my application GUI, I like to have my main GUI to be automatically maximized to the full Computer screen. I mean that the width and height of the main GUI windows should be equal to the computer screen width and height respectively after starting up the application.

We can achieve this in Netbeans using the following steps.

1) After adding a new JFrame Form .. with a name such as “MainUI.java”.

2) Click on MainUI.java in the Project window

3) In the Inspector windows under the Project window, click on the [JFrame]. Then, we will see that the Properties window on the right hand side is changed to [JFrame] Properties.

4) In the [JFrame] Properties windows, click on … next to the “preferredSize” property. A new [JFrame] preferredSize window will be poped up.

5) In the “preferredSize” property window, click on “Advanced…”.

6) Another “preferredSize — Advanced Initialization Code” windows is popped up. Check the box in front of “Generate Post-initialization Code”, and enter the code below.

//—————————————————–

Toolkit tk = Toolkit.getDefaultToolkit();
Dimension dimension = tk.getScreenSize();
int screenWidth = dimension.width;
int screenHeight = dimension.height;
setPreferredSize(dimension);
//——————————————————–

7) Click OK and Close. Now, try to right click on the “MainUI.java” and then click “Run File”. The MainUI window should be maximized to the full screen. If there is a problem about Toolkit class not found exception, just right click anywhere in the source code and then click “Fix import”.

La lógica lleva a más lógica

Apoyo a un mundo OPEN SOURCE!!!

Eso si es el paraíso