[Gvsig_desarrolladores] Panel Información de un Layer
Ruth Sos Del Diego
rsosdeldiego en googlemail.com
Jue Dic 1 12:12:28 CET 2011
Hola a todos,
De nuevo necesito una ayuda. A partir de una extensión que hay en la web
"Extworkshop" he modificado el código para obtener un panel de información
personalizado de un layer de mi proyecto. El código sería:
private void initialize() {
jLabel = new JLabel();
jLabel.setText("State:");
this.setSize(new Dimension(286, 132));
this.setPreferredSize(new Dimension(286, 132));
this.add(jLabel, null);
this.add(getTxtProvin(), null);
jLabel2 = new JLabel();
jLabel2.setText("Region:");
this.setSize(new Dimension(286, 132));
this.setPreferredSize(new Dimension(286, 132));
this.add(jLabel2,null);
this.add(getTxtProvin2(), null);
.
.
public WindowInfo getWindowInfo() {
if (wi==null)
{
wi = new WindowInfo( WindowInfo.PALETTE );
wi.setHeight(400);
wi.setWidth(400);
wi.setTitle("Information sugarcane in the States");
}
return wi;
}
.
.
.
private JTextField getTxtProvin() {
if (txtProvin == null) {
txtProvin = new JTextField();
txtProvin.setPreferredSize(new Dimension(100, 20));
}
return txtProvin;
}
private JTextField getTxtProvin2() {
if (txtProvin2 == null) {
txtProvin2 = new JTextField();
txtProvin2.setPreferredSize(new Dimension(100, 20));
}
return txtProvin2;
}
Necesito que se muestre una línea debajo de otra. Adjunto un screenshot del
resultado. Cómo puedo indicarle que JLabel y JText se escriban uno debajo
del otro?
Gracias de antemano,
Ruth
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://listserv.gva.es/pipermail/gvsig_desarrolladores/attachments/20111201/3739d223/attachment.htm
------------ próxima parte ------------
Se ha borrado un mensaje que no está en formato texto plano...
Nombre : Scrennshot.jpg
Tipo : image/jpeg
Tamaño : 58092 bytes
Descripción: no disponible
Url : http://listserv.gva.es/pipermail/gvsig_desarrolladores/attachments/20111201/3739d223/attachment.jpg
Más información sobre la lista de distribución gvSIG_desarrolladores