-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebListing.java
More file actions
36 lines (22 loc) · 856 Bytes
/
webListing.java
File metadata and controls
36 lines (22 loc) · 856 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import java.io.*;
import javax.swing.*;
import java.awt.*;
public class webListing extends JFrame{
private JEditorPane editorpane;
JScrollPane editorScrollPane;
String files = "A.txt";;
Reader filereader;
public webListing() throws IOException
{
editorpane= new JEditorPane();
editorpane.setEditable(true);
filereader=new FileReader(files);
File file = new File(files);
editorpane.setPage(file.toURI().toURL());
editorScrollPane = new JScrollPane(editorpane);
editorScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
editorScrollPane.setPreferredSize(new Dimension(250, 145));
editorScrollPane.setMinimumSize(new Dimension(10, 10));
getContentPane().add(editorScrollPane);
}
}