Ver Mensaje Individual
  #2 (permalink)  
Antiguo 12/01/2015, 12:01
Avatar de loncho_rojas
loncho_rojas
Colaborador
 
Fecha de Ingreso: octubre-2008
Ubicación: En el mejor lugar del mundo
Mensajes: 2.704
Antigüedad: 15 años, 7 meses
Puntos: 175
Respuesta: Posicionar Radio Buttons en un formulario en Java

pero no le estas poniendo ningún valor de posición.

Código Java:
Ver original
  1. jRadioButton1 = new javax.swing.JRadioButton();
  2.         jRadioButton2 = new javax.swing.JRadioButton();
  3.  
  4.         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  5.  
  6.         jRadioButton1.setText("jRadioButton1");
  7.  
  8.         jRadioButton2.setText("jRadioButton2");
  9.  
  10.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  11.         getContentPane().setLayout(layout);
  12.         layout.setHorizontalGroup(
  13.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  14.             .addGroup(layout.createSequentialGroup()
  15.                 .addGap(199, 199, 199)
  16.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  17.                     .addComponent(jRadioButton2)
  18.                     .addComponent(jRadioButton1))
  19.                 .addContainerGap(364, Short.MAX_VALUE))
  20.         );
  21.         layout.setVerticalGroup(
  22.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  23.             .addGroup(layout.createSequentialGroup()
  24.                 .addGap(23, 23, 23)
  25.                 .addComponent(jRadioButton1)
  26.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  27.                 .addComponent(jRadioButton2)
  28.                 .addContainerGap(348, Short.MAX_VALUE))
  29.         );
__________________
Ayudo con lo que puedo en el foro, y solo en el foro.. NO MENSAJES PRIVADOS.. NO EMAILS NI SKYPE u OTROS.

Antes de hacer un TOPICO piensa si puedes hallarlo en Google o en el Buscador del Foro...

Última edición por loncho_rojas; 12/01/2015 a las 12:08