Vamos criar um Artigo sobre RMI

1 resposta
kemperacc

Pessoal,

Estou começando a estudar RMI e gostaria de fazer um artigo sobre, para que pessoas como eu tenham mais facilidade de aprender sobre o assunto.

Vamos juntar as inforamações aki, depois que tudo estiver ok, eu vou publicar no meu blog e a gente vai melhorando ele. Quando estiver 100%, a gente publica aqui no GUJ.

Bom, eu pensei em fazer algo basico, mas que va demonstrar as capacidades do RMI. Minha ideia:

Fazer uma janela do tipo HELLO WORLD, mas que vai estar no servidor e uma aplicação que vá exibi-la em um DESKTOP.

FIZ NO ECLIPSE RAPIDINHO AKI UMA JANELA…

ESTOU DE SAIDA AGORA, ACHO QUE VOLTO SOH DE MADRUGA PRA CONTINUAR

import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Rectangle;
import javax.swing.SwingConstants;
import java.awt.Font;

public class FormHelloWorld extends JFrame {

	private static final long serialVersionUID = 1L;

	private JPanel jContentPane = null;

	private JLabel jLabel = null;

	/**
	 * This is the default constructor
	 */
	public FormHelloWorld() {
		super();
		initialize();
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		this.setSize(300, 200);
		this.setContentPane(getJContentPane());
		this.setTitle("GUJ");
	}

	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jLabel = new JLabel();
			jLabel.setBounds(new Rectangle(14, 60, 259, 36));
			jLabel.setHorizontalAlignment(SwingConstants.CENTER);
			jLabel.setFont(new Font("Dialog", Font.BOLD, 18));
			jLabel.setText("HELLO WORLD GUJ");
			jContentPane = new JPanel();
			jContentPane.setLayout(null);
			jContentPane.add(jLabel, null);
		}
		return jContentPane;
	}

}

1 Resposta

diego_arruda

Aqui no GUJ tem um artigo muito bom sobre RMI -> http://www.guj.com.br/java.tutorial.artigo.37.1.guj

Você poderia atualiza-lo para o Java 5, tipo, iniciando o rmiregistry diretamente da aplicação. Acho que seria mais útil.

Criado 25 de novembro de 2006
Ultima resposta 25 de nov. de 2006
Respostas 1
Participantes 2