You are on page 1of 9

Sistemas Distribuidos - Servicio de

Navegación
• Guía para leer un archivo tipo texto desde un
servidor.
• Instale el XAMPP u otro Web Server
• Cree un archivo texto el htdocs y llámelo
SistemasDistribuido.txt o invoque index.php
• Cree las clases en java para acceder al archivo en
el servidor.
• Ejecute la clase.
• Modifique la clase para mostrar un archivo .jpg u
otro gráfico
Estructura del proyecto
1. Ingrese a Netbeans
2. Seleccione categoría Java
3. Project Java Application
4. Nombre el Proyecto como
Server
Clase Acceso a servidor
Clase Acceso a servidor
Clase de despliegue
Selección main class
Clases utilizadas
• JTextField
• JEditorPane
• Container
JEditorPane
Constructor Description

JEditorPane() It creates a new JEditorPane.


JEditorPane(String url) It creates a JEditorPane based on a string
containing a URL specification.
JEditorPane(String type, String text) It creates a JEditorPane that has been
initialized to the given text.
JEditorPane(URL initialPage) It creates a JEditorPane based on a specified
URL for input.
Modifier and Type Method Description

void addHyperlinkListener(HyperlinkListener listener) Adds a hyperlink listener for


notification of any changes, for
example when a link is selected
and entered.
protected createDefaultEditorKit() It creates the default editor kit
EditorKit (PlainEditorKit) for when the
component is first created.
void setText(String t) It sets the text of this
TextComponent to the specified
content, which is expected to be
in the format of the content type
of this editor.
void setContentType(String type) It sets the type of content that
this editor handles.
void setPage(URL page) It sets the current URL being
displayed.
void read(InputStream in, Object desc) This method initializes from a
stream.
void scrollToReference(String reference) It scrolls the view to the given
reference location (that is, the
value returned by the UL.getRef
method for the URL being
displayed).
void setText(String t) It sets the text of this
TextComponent to the specified
content, which is expected to be
in the format of the content type
of this editor.
String getText() It returns the text contained in
this TextComponent in terms of
the content type of this editor.
void read(InputStream in, Object desc) This method initializes from a
stream.

You might also like