diff --git a/build/classes/random/text/generator/RandomTextGeneratorGui$1.class b/build/classes/random/text/generator/RandomTextGeneratorGui$1.class new file mode 100644 index 0000000..bc0b6fa Binary files /dev/null and b/build/classes/random/text/generator/RandomTextGeneratorGui$1.class differ diff --git a/build/classes/random/text/generator/RandomTextGeneratorGui$2.class b/build/classes/random/text/generator/RandomTextGeneratorGui$2.class new file mode 100644 index 0000000..98bdcde Binary files /dev/null and b/build/classes/random/text/generator/RandomTextGeneratorGui$2.class differ diff --git a/build/classes/random/text/generator/RandomTextGeneratorGui.class b/build/classes/random/text/generator/RandomTextGeneratorGui.class new file mode 100644 index 0000000..980aaf3 Binary files /dev/null and b/build/classes/random/text/generator/RandomTextGeneratorGui.class differ diff --git a/build/classes/random/text/generator/RandomTextGeneratorGui.form b/build/classes/random/text/generator/RandomTextGeneratorGui.form new file mode 100644 index 0000000..5dc4ab8 --- /dev/null +++ b/build/classes/random/text/generator/RandomTextGeneratorGui.form @@ -0,0 +1,89 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties index 08bbc8d..deaf985 100644 --- a/nbproject/private/private.properties +++ b/nbproject/private/private.properties @@ -1,2 +1,2 @@ compile.on.save=true -user.properties.file=C:\\Users\\Ma Jing\\AppData\\Roaming\\NetBeans\\8.1\\build.properties +user.properties.file=C:\\Users\\Marco Antonio\\AppData\\Roaming\\NetBeans\\8.0\\build.properties diff --git a/src/random/text/generator/RandomTextGeneratorGui.form b/src/random/text/generator/RandomTextGeneratorGui.form new file mode 100644 index 0000000..5dc4ab8 --- /dev/null +++ b/src/random/text/generator/RandomTextGeneratorGui.form @@ -0,0 +1,89 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/random/text/generator/RandomTextGeneratorGui.java b/src/random/text/generator/RandomTextGeneratorGui.java new file mode 100644 index 0000000..e949584 --- /dev/null +++ b/src/random/text/generator/RandomTextGeneratorGui.java @@ -0,0 +1,129 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package random.text.generator; + +/** + * + * @author Marco Antonio + */ +public class RandomTextGeneratorGui extends javax.swing.JFrame { + + /** + * Creates new form Gui + */ + public RandomTextGeneratorGui() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jlText = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + jtArea = new javax.swing.JTextArea(); + jbGenerate = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Random Text Generator"); + + jlText.setText("Text:"); + + jtArea.setColumns(20); + jtArea.setRows(5); + jScrollPane1.setViewportView(jtArea); + + jbGenerate.setText("Generate"); + jbGenerate.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jbGenerateActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jlText) + .addGap(18, 18, 18) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jbGenerate))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(52, 52, 52) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jlText) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 79, Short.MAX_VALUE) + .addComponent(jbGenerate) + .addGap(48, 48, 48)) + ); + + pack(); + }// //GEN-END:initComponents + + private void jbGenerateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbGenerateActionPerformed + // TODO add your handling code here: + System.out.println(jtArea.getText()); + }//GEN-LAST:event_jbGenerateActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(RandomTextGeneratorGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(RandomTextGeneratorGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(RandomTextGeneratorGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(RandomTextGeneratorGui.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new RandomTextGeneratorGui().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JButton jbGenerate; + private javax.swing.JLabel jlText; + private javax.swing.JTextArea jtArea; + // End of variables declaration//GEN-END:variables +}