Created
April 19, 2009 09:19
-
-
Save xaicron/97988 to your computer and use it in GitHub Desktop.
AAviewer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.Font; | |
import java.awt.BorderLayout; | |
public class AAviewer extends JFrame{ | |
public static void main(String[] args){ | |
new AAviewer(); | |
} | |
AAviewer() { | |
JTextArea textarea = new JTextArea(); | |
textarea.setWrapStyleWord(true); | |
textarea.setLineWrap(false); | |
textarea.setFont(new Font("MS PGothic", Font.PLAIN, 16)); | |
JScrollPane scrollpane = new JScrollPane(textarea); | |
scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); | |
scrollpane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); | |
getContentPane().add(scrollpane, BorderLayout.CENTER); | |
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
setSize(800, 600); | |
setTitle("AA Viewer"); | |
setLocationRelativeTo(null); | |
setVisible(true); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javac AAviewer.java | |
jar cvfm AAviewer.jar MANIFEST AAviewer.class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Main-Class: AAviewer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment