Skip to content

Instantly share code, notes, and snippets.

@xaicron
Created April 19, 2009 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xaicron/97988 to your computer and use it in GitHub Desktop.
Save xaicron/97988 to your computer and use it in GitHub Desktop.
AAviewer
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);
}
}
javac AAviewer.java
jar cvfm AAviewer.jar MANIFEST AAviewer.class
Main-Class: AAviewer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment