Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > JAVA
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 08-04-2007
Avatar de Diavlo
Diavlo Diavlo is offline
Miembro
 
Registrado: dic 2005
Posts: 53
Poder: 19
Diavlo Va por buen camino
Ayuda con JInternalFrame

Holassssss, necesito ayuda sobre el JInternalFrame, lo q quiero hacer es como una pagina HTML con un IFRAME, lo mismo quiero hacer en JAVA, la ventana es un JFrame y quiero poner un JInternalFrame q seria como el iframe en HTML, pero ya busque en Google me lei tutoriale y no tengi todavia como lograrlo.
La idea es q en una ventana con varios botones al hacer click en uno de ellos q se cargue una subventana como en html con el iframe, espero haberme explicado bien.
__________________
Todo el Mal Que Me Hagas A Ti Te Lo Haras
Responder Con Cita
  #2  
Antiguo 10-04-2007
juliangh75 juliangh75 is offline
Registrado
 
Registrado: nov 2006
Posts: 4
Poder: 0
juliangh75 Va por buen camino
Ayuda con JInternalFrame

import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

public class FormaInterna extends JInternalFrame implements Client {
private JTextArea txtArea=new JTextArea();

/**
* Constructor
*/
public FormaInterna(){
super("Forma Interna", true, true, true, true);

//AQUI SE DEBE INICIALIZAR EL OBJETO MEDIATOR

JPanel panel=(JPanel)this.getContentPane();
panel.setLayout(new BoxLayout(panel,BoxLayout.PAGE_AXIS));
panel.setBorder(BorderFactory.createEmptyBorder(15,15,15,15));
JButton btnEnvioMensaje=new JButton("Interno");

btnEnvioMensaje.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent event) {
//AÑADIR LA INVOCACION AL METODO DE ENVIO DE MENSAJES
//broadcastEvent();
}
});

JPanel panelBotones=new JPanel();
panelBotones.setLayout(new BoxLayout(panelBotones,BoxLayout.LINE_AXIS));
panelBotones.add(btnEnvioMensaje);

panel.add(panelBotones);
panel.add(Box.createRigidArea(new Dimension(0,10)));
panel.add(new JScrollPane(txtArea));

this.setSize(new Dimension(300,300));
this.setVisible(true);
}
public void handleEvent() {
// TODO Auto-generated method stub
txtArea.setText(txtArea.getText() + "Recibiendo Notificacion\r\n" );
}
public void broadcastEvent() {
// TODO Auto-generated method stub
txtArea.setText(txtArea.getText() + "Enviando Notificacion\r\n");
mediator.broadcastEvent();
}
}

Genera esta clase.

y al boton del Frame ponle el siguiente codigo
FormaInterna frame = new FormaInterna();
frame.setVisible(true);
desktop.add(frame);
try {
frame.setSelected(true);
} catch (java.beans.PropertyVetoException e) {}

Saludos
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Instalar Ayuda (.HLP) en la Ayuda de Delphi? MasterXP Varios 6 12-04-2006 06:57:49
Ayuda para crear ayuda... Gabriel2 Varios 2 10-06-2005 00:15:18
Leer la ayuda... Ayuda! MaJeSTiC Varios 0 04-08-2004 21:24:42
ayuda con strtofloat, ayuda punto flotante TURING Varios 5 30-04-2004 08:03:59
Ayuda Con Instalacion De Archivos De Ayuda Legolas Varios 1 01-12-2003 14:48:03


La franja horaria es GMT +2. Ahora son las 21:06:32.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi