Tweak Notepad

master
skylarmt 9 years ago
parent 502ef6d9a0
commit e2635ba44b

@ -54,33 +54,33 @@
<Layout> <Layout>
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane4" alignment="0" pref="394" max="32767" attributes="0"/> <Component id="jScrollPane1" alignment="1" pref="394" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
<DimensionLayout dim="1"> <DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Component id="jScrollPane4" alignment="0" pref="273" max="32767" attributes="0"/> <Component id="jScrollPane1" alignment="1" pref="277" max="32767" attributes="0"/>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
</Layout> </Layout>
<SubComponents> <SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane4"> <Container class="javax.swing.JScrollPane" name="jScrollPane1">
<Properties>
<Property name="font" type="java.awt.Font" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="Font.getFont(Font.MONOSPACED)" type="code"/>
</Property>
</Properties>
<AuxValues> <AuxValues>
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
</AuxValues> </AuxValues>
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
<SubComponents> <SubComponents>
<Component class="javax.swing.JEditorPane" name="textBox"> <Component class="javax.swing.JTextArea" name="textBox">
<Properties> <Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="cc" green="ff" red="ff" type="rgb"/> <Color blue="cc" green="ff" red="ff" type="rgb"/>
</Property> </Property>
<Property name="columns" type="int" value="1"/>
<Property name="lineWrap" type="boolean" value="true"/>
<Property name="rows" type="int" value="1"/>
<Property name="tabSize" type="int" value="4"/>
<Property name="wrapStyleWord" type="boolean" value="true"/>
</Properties> </Properties>
<Events> <Events>
<EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="textBoxKeyTyped"/> <EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="textBoxKeyTyped"/>

@ -78,8 +78,8 @@ public class Notepad extends javax.swing.JInternalFrame {
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() { private void initComponents() {
jScrollPane4 = new javax.swing.JScrollPane(); jScrollPane1 = new javax.swing.JScrollPane();
textBox = new javax.swing.JEditorPane(); textBox = new javax.swing.JTextArea();
jMenuBar1 = new javax.swing.JMenuBar(); jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu(); jMenu1 = new javax.swing.JMenu();
eraseBtn = new javax.swing.JMenuItem(); eraseBtn = new javax.swing.JMenuItem();
@ -91,15 +91,18 @@ public class Notepad extends javax.swing.JInternalFrame {
setTitle("Notepad"); setTitle("Notepad");
setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/notepad.png"))); // NOI18N setFrameIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/icons/notepad.png"))); // NOI18N
jScrollPane4.setFont(Font.getFont(Font.MONOSPACED));
textBox.setBackground(new java.awt.Color(255, 255, 204)); textBox.setBackground(new java.awt.Color(255, 255, 204));
textBox.setColumns(1);
textBox.setLineWrap(true);
textBox.setRows(1);
textBox.setTabSize(4);
textBox.setWrapStyleWord(true);
textBox.addKeyListener(new java.awt.event.KeyAdapter() { textBox.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) { public void keyTyped(java.awt.event.KeyEvent evt) {
textBoxKeyTyped(evt); textBoxKeyTyped(evt);
} }
}); });
jScrollPane4.setViewportView(textBox); jScrollPane1.setViewportView(textBox);
jMenu1.setText("File"); jMenu1.setText("File");
@ -120,11 +123,11 @@ public class Notepad extends javax.swing.JInternalFrame {
getContentPane().setLayout(layout); getContentPane().setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 394, Short.MAX_VALUE)
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 277, Short.MAX_VALUE)
); );
pack(); pack();
@ -150,7 +153,7 @@ public class Notepad extends javax.swing.JInternalFrame {
private javax.swing.JMenuItem eraseBtn; private javax.swing.JMenuItem eraseBtn;
private javax.swing.JMenu jMenu1; private javax.swing.JMenu jMenu1;
private javax.swing.JMenuBar jMenuBar1; private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JScrollPane jScrollPane4; private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JEditorPane textBox; private javax.swing.JTextArea textBox;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
} }

Loading…
Cancel
Save