

{"id":135092,"date":"2024-04-27T18:59:07","date_gmt":"2024-04-27T13:29:07","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=135092"},"modified":"2024-04-27T18:59:07","modified_gmt":"2024-04-27T13:29:07","slug":"java-notepad-project","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/","title":{"rendered":"Java Project &#8211; How to Design a NotePad"},"content":{"rendered":"<h3>Program 1<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/*\r\n * To change this license header, choose License Headers in Project Properties.\r\n * To change this template file, choose Tools | Templates\r\n * and open the template in the editor.\r\n *\/\r\n\r\npackage dataflair;\r\n\r\nimport java.awt.Color;\r\nimport java.io.*;\r\nimport javax.swing.JFileChooser;\r\nimport javax.swing.JOptionPane;\r\n\/**\r\n *\r\n * @author admin\r\n *\/\r\npublic class MyNotePad extends javax.swing.JFrame {\r\n\r\n    String opensave=null;\r\n    public MyNotePad() {\r\n        initComponents();\r\n        FC.setVisible(false);\r\n        CC.setVisible(false);\r\n        btnColor.setVisible(false);\r\n    }\r\n\r\n    \/**\r\n     * This method is called from within the constructor to initialize the form.\r\n     * WARNING: Do NOT modify this code. The content of this method is always\r\n     * regenerated by the Form Editor.\r\n     *\/\r\n    @SuppressWarnings(\"unchecked\")\r\n    \/\/ &lt;editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\"&gt;\/\/GEN-BEGIN:initComponents\r\n    private void initComponents() {\r\n\r\n        jPanel1 = new javax.swing.JPanel();\r\n        jScrollPane1 = new javax.swing.JScrollPane();\r\n        textbox = new javax.swing.JTextPane();\r\n        FC = new javax.swing.JFileChooser();\r\n        CC = new javax.swing.JColorChooser();\r\n        btnColor = new javax.swing.JButton();\r\n        jMenuBar1 = new javax.swing.JMenuBar();\r\n        jMenu1 = new javax.swing.JMenu();\r\n        jMenuItem1 = new javax.swing.JMenuItem();\r\n        jMenuItem2 = new javax.swing.JMenuItem();\r\n        jMenuItem18 = new javax.swing.JMenuItem();\r\n        jMenuItem3 = new javax.swing.JMenuItem();\r\n        jMenuItem4 = new javax.swing.JMenuItem();\r\n        jSeparator1 = new javax.swing.JPopupMenu.Separator();\r\n        jMenuItem5 = new javax.swing.JMenuItem();\r\n        jMenuItem6 = new javax.swing.JMenuItem();\r\n        jSeparator2 = new javax.swing.JPopupMenu.Separator();\r\n        jMenuItem7 = new javax.swing.JMenuItem();\r\n        jMenu2 = new javax.swing.JMenu();\r\n        jMenuItem8 = new javax.swing.JMenuItem();\r\n        jSeparator3 = new javax.swing.JPopupMenu.Separator();\r\n        jMenuItem9 = new javax.swing.JMenuItem();\r\n        jMenuItem10 = new javax.swing.JMenuItem();\r\n        jMenuItem11 = new javax.swing.JMenuItem();\r\n        jSeparator4 = new javax.swing.JPopupMenu.Separator();\r\n        jMenuItem12 = new javax.swing.JMenuItem();\r\n        jMenu3 = new javax.swing.JMenu();\r\n        jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();\r\n        jMenuItem14 = new javax.swing.JMenuItem();\r\n        jMenuItem15 = new javax.swing.JMenuItem();\r\n        jMenuItem19 = new javax.swing.JMenuItem();\r\n        jMenu4 = new javax.swing.JMenu();\r\n        jMenu7 = new javax.swing.JMenu();\r\n        jMenuItem16 = new javax.swing.JMenuItem();\r\n        jMenuItem17 = new javax.swing.JMenuItem();\r\n        jMenu5 = new javax.swing.JMenu();\r\n        jMenu6 = new javax.swing.JMenu();\r\n\r\n        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\r\n        setTitle(\"Untitled-NotePad\");\r\n\r\n        textbox.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); \/\/ NOI18N\r\n        jScrollPane1.setViewportView(textbox);\r\n\r\n        FC.setDialogType(javax.swing.JFileChooser.SAVE_DIALOG);\r\n        FC.setDialogTitle(\"Save Dialog\");\r\n        FC.addMouseListener(new java.awt.event.MouseAdapter() {\r\n            public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n                FCMouseClicked(evt);\r\n            }\r\n        });\r\n        FC.addActionListener(new java.awt.event.ActionListener() {\r\n            public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n                FCActionPerformed(evt);\r\n            }\r\n        });\r\n\r\n        CC.addMouseListener(new java.awt.event.MouseAdapter() {\r\n            public void mouseClicked(java.awt.event.MouseEvent evt) {\r\n                CCMouseClicked(evt);\r\n            }\r\n        });\r\n\r\n        btnColor.setText(\"Apply\");\r\n        btnColor.addActionListener(new java.awt.event.ActionListener() {\r\n            public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n                btnColorActionPerformed(evt);\r\n            }\r\n        });\r\n\r\n        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\r\n        jPanel1.setLayout(jPanel1Layout);\r\n        jPanel1Layout.setHorizontalGroup(\r\n            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n            .addGroup(jPanel1Layout.createSequentialGroup()\r\n                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n                    .addGroup(jPanel1Layout.createSequentialGroup()\r\n                        .addGap(30, 30, 30)\r\n                        .addComponent(CC, javax.swing.GroupLayout.PREFERRED_SIZE, 520, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n                    .addGroup(jPanel1Layout.createSequentialGroup()\r\n                        .addGap(18, 18, 18)\r\n                        .addComponent(FC, javax.swing.GroupLayout.PREFERRED_SIZE, 532, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n                    .addGroup(jPanel1Layout.createSequentialGroup()\r\n                        .addGap(273, 273, 273)\r\n                        .addComponent(btnColor, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)))\r\n                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1569, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n                .addContainerGap(421, Short.MAX_VALUE))\r\n        );\r\n        jPanel1Layout.setVerticalGroup(\r\n            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n            .addGroup(jPanel1Layout.createSequentialGroup()\r\n                .addContainerGap()\r\n                .addComponent(FC, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n                .addComponent(CC, javax.swing.GroupLayout.PREFERRED_SIZE, 328, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n                .addComponent(btnColor)\r\n                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n            .addGroup(jPanel1Layout.createSequentialGroup()\r\n                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 800, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n                .addGap(0, 2411, Short.MAX_VALUE))\r\n        );\r\n\r\n        jMenu1.setText(\"File\");\r\n\r\n        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem1.setText(\"New\");\r\n        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\r\n            public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n                jMenuItem1ActionPerformed(evt);\r\n            }\r\n        });\r\n        jMenu1.add(jMenuItem1);\r\n\r\n        jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem2.setText(\"New Window\");\r\n        jMenu1.add(jMenuItem2);\r\n\r\n        jMenuItem18.setText(\"Open\");\r\n        jMenuItem18.addActionListener(new java.awt.event.ActionListener() {\r\n            public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n                jMenuItem18ActionPerformed(evt);\r\n            }\r\n        });\r\n        jMenu1.add(jMenuItem18);\r\n\r\n        jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem3.setText(\"Save\");\r\n        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {\r\n            public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n                jMenuItem3ActionPerformed(evt);\r\n            }\r\n        });\r\n        jMenu1.add(jMenuItem3);\r\n\r\n        jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem4.setText(\"Save As\");\r\n        jMenu1.add(jMenuItem4);\r\n        jMenu1.add(jSeparator1);\r\n\r\n        jMenuItem5.setText(\"Page Set UP\");\r\n        jMenu1.add(jMenuItem5);\r\n\r\n        jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem6.setText(\"Print\");\r\n        jMenu1.add(jMenuItem6);\r\n        jMenu1.add(jSeparator2);\r\n\r\n        jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem7.setText(\"Exit\");\r\n        jMenuItem7.addActionListener(new java.awt.event.ActionListener() {\r\n            public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n                jMenuItem7ActionPerformed(evt);\r\n            }\r\n        });\r\n        jMenu1.add(jMenuItem7);\r\n\r\n        jMenuBar1.add(jMenu1);\r\n\r\n        jMenu2.setText(\"Edit\");\r\n\r\n        jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Z, java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem8.setText(\"Undo\");\r\n        jMenu2.add(jMenuItem8);\r\n        jMenu2.add(jSeparator3);\r\n\r\n        jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem9.setText(\"Cut\");\r\n        jMenu2.add(jMenuItem9);\r\n\r\n        jMenuItem10.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem10.setText(\"Copy\");\r\n        jMenu2.add(jMenuItem10);\r\n\r\n        jMenuItem11.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem11.setText(\"Paste\");\r\n        jMenu2.add(jMenuItem11);\r\n        jMenu2.add(jSeparator4);\r\n\r\n        jMenuItem12.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_V, java.awt.event.InputEvent.CTRL_MASK));\r\n        jMenuItem12.setText(\"Delete\");\r\n        jMenu2.add(jMenuItem12);\r\n\r\n        jMenuBar1.add(jMenu2);\r\n\r\n        jMenu3.setText(\"Format\");\r\n\r\n        jCheckBoxMenuItem1.setSelected(true);\r\n        jCheckBoxMenuItem1.setText(\"Word Wrap\");\r\n        jMenu3.add(jCheckBoxMenuItem1);\r\n\r\n        jMenuItem14.setText(\"Font...\");\r\n        jMenu3.add(jMenuItem14);\r\n\r\n        jMenuItem15.setText(\"Show Color\");\r\n        jMenuItem15.addActionListener(new java.awt.event.ActionListener() {\r\n            public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n                jMenuItem15ActionPerformed(evt);\r\n            }\r\n        });\r\n        jMenu3.add(jMenuItem15);\r\n\r\n        jMenuItem19.setText(\"Hide Color \");\r\n        jMenuItem19.addActionListener(new java.awt.event.ActionListener() {\r\n            public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n                jMenuItem19ActionPerformed(evt);\r\n            }\r\n        });\r\n        jMenu3.add(jMenuItem19);\r\n\r\n        jMenuBar1.add(jMenu3);\r\n\r\n        jMenu4.setText(\"View\");\r\n\r\n        jMenu7.setText(\"Zoom\");\r\n\r\n        jMenuItem16.setText(\"Zoom In\");\r\n        jMenu7.add(jMenuItem16);\r\n\r\n        jMenuItem17.setText(\"ZoomOut\");\r\n        jMenu7.add(jMenuItem17);\r\n\r\n        jMenu4.add(jMenu7);\r\n\r\n        jMenuBar1.add(jMenu4);\r\n\r\n        jMenu5.setText(\"Help\");\r\n        jMenuBar1.add(jMenu5);\r\n\r\n        jMenu6.setText(\"Abut Us\");\r\n        jMenuBar1.add(jMenu6);\r\n\r\n        setJMenuBar(jMenuBar1);\r\n\r\n        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n        getContentPane().setLayout(layout);\r\n        layout.setHorizontalGroup(\r\n            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n            .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n        );\r\n        layout.setVerticalGroup(\r\n            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n            .addGroup(layout.createSequentialGroup()\r\n                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n                .addGap(0, 0, Short.MAX_VALUE))\r\n        );\r\n\r\n        pack();\r\n    }\/\/ &lt;\/editor-fold&gt;\/\/GEN-END:initComponents\r\n\r\n    private void jMenuItem7ActionPerformed(java.awt.event.ActionEvent evt) {\/\/GEN-FIRST:event_jMenuItem7ActionPerformed\r\n        \/\/ TODO add your handling code here:\r\n        int n;\r\n        n=JOptionPane.showConfirmDialog(this, \"Are you sure want to exit\",\"Exit Window\",JOptionPane.OK_CANCEL_OPTION);\r\n        if(n==0)\r\n        System.exit(0);\r\n        \r\n    }\/\/GEN-LAST:event_jMenuItem7ActionPerformed\r\n\r\n    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {\/\/GEN-FIRST:event_jMenuItem3ActionPerformed\r\n        \/\/ TODO add your handling code here:\r\n        \/\/System.out.println(\"This is save choice\");\r\n        opensave=\"save\";\r\n        FC.setVisible(true);\r\n    }\/\/GEN-LAST:event_jMenuItem3ActionPerformed\r\n\r\n    private void FCActionPerformed(java.awt.event.ActionEvent evt) {\/\/GEN-FIRST:event_FCActionPerformed\r\n        \/\/ TODO add your handling code here:\r\n\/\/         JOptionPane.showMessageDialog(this, \"This is save button action...\");\r\n  if(opensave.equals(\"save\"))     \r\n  {     \r\n    \/\/ For Save file in hard disk \r\n   \r\n       try\r\n       {    \r\n         File filename;\r\n         filename=FC.getSelectedFile();\r\n         String data=textbox.getText();\r\n         FileOutputStream fos=new FileOutputStream(filename);\r\n         byte b[]=data.getBytes();\r\n         fos.write(b);\r\n         fos.close();\r\n       \/\/ JOptionPane.showMessageDialog(this, filename);\r\n         FC.setVisible(false);\r\n       }\r\n       catch(Exception e)\r\n       {\r\n           JOptionPane.showMessageDialog(this, e);\r\n       }    \r\n  }\r\n  else\r\n  {\r\n       \/\/ For open file from hard disk\r\n     try \r\n     {   \r\n         File filename;\r\n         filename=FC.getSelectedFile();\r\n         JOptionPane.showMessageDialog(this, filename);\r\n         FileInputStream fis=new FileInputStream(filename);\r\n            int length;\r\n            length=(int)filename.length();\r\n            byte b[]=new byte[length];\r\n            fis.read(b);\r\n            String str=new String(b);\r\n            textbox.setText(str);\r\n            fis.close();\r\n            FC.setVisible(false);\r\n     }\r\n     catch(Exception e)\r\n     {\r\n          JOptionPane.showMessageDialog(this, e);\r\n     }   \r\n         \r\n  }\r\n    }\/\/GEN-LAST:event_FCActionPerformed\r\n\r\n    private void FCMouseClicked(java.awt.event.MouseEvent evt) {\/\/GEN-FIRST:event_FCMouseClicked\r\n        \/\/ TODO add your handling code here:\r\n    }\/\/GEN-LAST:event_FCMouseClicked\r\n\r\n    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {\/\/GEN-FIRST:event_jMenuItem1ActionPerformed\r\n        \/\/ TODO add your handling code here:\r\n        \r\n        \r\n    }\/\/GEN-LAST:event_jMenuItem1ActionPerformed\r\n\r\n    private void jMenuItem18ActionPerformed(java.awt.event.ActionEvent evt) {\/\/GEN-FIRST:event_jMenuItem18ActionPerformed\r\n        \/\/ TODO add your handling code here:\r\n        opensave=\"open\";\r\n        FC.setDialogType(JFileChooser.OPEN_DIALOG);\r\n        FC.setVisible(true);\r\n    }\/\/GEN-LAST:event_jMenuItem18ActionPerformed\r\n\r\n    private void jMenuItem15ActionPerformed(java.awt.event.ActionEvent evt) {\/\/GEN-FIRST:event_jMenuItem15ActionPerformed\r\n        \/\/ TODO add your handling code here:\r\n        CC.setVisible(true);\r\n        btnColor.setVisible(true);\r\n    }\/\/GEN-LAST:event_jMenuItem15ActionPerformed\r\n\r\n    private void CCMouseClicked(java.awt.event.MouseEvent evt) {\/\/GEN-FIRST:event_CCMouseClicked\r\n        \/\/ TODO add your handling code here:\r\n        JOptionPane.showMessageDialog(this, \"Color code click event\");\r\n    }\/\/GEN-LAST:event_CCMouseClicked\r\n\r\n    private void jMenuItem19ActionPerformed(java.awt.event.ActionEvent evt) {\/\/GEN-FIRST:event_jMenuItem19ActionPerformed\r\n        \/\/ TODO add your handling code here:\r\n        CC.setVisible(false);\r\n        btnColor.setVisible(false);\r\n    }\/\/GEN-LAST:event_jMenuItem19ActionPerformed\r\n\r\n    private void btnColorActionPerformed(java.awt.event.ActionEvent evt) {\/\/GEN-FIRST:event_btnColorActionPerformed\r\n        \/\/ TODO add your handling code here:\r\n        Color C;\r\n        C=CC.getColor();\r\n        textbox.setForeground(C);\r\n    }\/\/GEN-LAST:event_btnColorActionPerformed\r\n\r\n    \/**\r\n     * @param args the command line arguments\r\n     *\/\r\n    public static void main(String args[]) {\r\n        \/* Set the Nimbus look and feel *\/\r\n        \/\/&lt;editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \"&gt;\r\n        \/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\r\n         * For details see http:\/\/download.oracle.com\/javase\/tutorial\/uiswing\/lookandfeel\/plaf.html \r\n         *\/\r\n        try {\r\n            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {\r\n                if (\"Nimbus\".equals(info.getName())) {\r\n                    javax.swing.UIManager.setLookAndFeel(info.getClassName());\r\n                    break;\r\n                }\r\n            }\r\n        } catch (ClassNotFoundException ex) {\r\n            java.util.logging.Logger.getLogger(MyNotePad.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n        } catch (InstantiationException ex) {\r\n            java.util.logging.Logger.getLogger(MyNotePad.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n        } catch (IllegalAccessException ex) {\r\n            java.util.logging.Logger.getLogger(MyNotePad.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n        } catch (javax.swing.UnsupportedLookAndFeelException ex) {\r\n            java.util.logging.Logger.getLogger(MyNotePad.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);\r\n        }\r\n        \/\/&lt;\/editor-fold&gt;\r\n\r\n        \/* Create and display the form *\/\r\n        java.awt.EventQueue.invokeLater(new Runnable() {\r\n            public void run() {\r\n                new MyNotePad().setVisible(true);\r\n            }\r\n        });\r\n    }\r\n\r\n    \/\/ Variables declaration - do not modify\/\/GEN-BEGIN:variables\r\n    private javax.swing.JColorChooser CC;\r\n    private javax.swing.JFileChooser FC;\r\n    private javax.swing.JButton btnColor;\r\n    private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem1;\r\n    private javax.swing.JMenu jMenu1;\r\n    private javax.swing.JMenu jMenu2;\r\n    private javax.swing.JMenu jMenu3;\r\n    private javax.swing.JMenu jMenu4;\r\n    private javax.swing.JMenu jMenu5;\r\n    private javax.swing.JMenu jMenu6;\r\n    private javax.swing.JMenu jMenu7;\r\n    private javax.swing.JMenuBar jMenuBar1;\r\n    private javax.swing.JMenuItem jMenuItem1;\r\n    private javax.swing.JMenuItem jMenuItem10;\r\n    private javax.swing.JMenuItem jMenuItem11;\r\n    private javax.swing.JMenuItem jMenuItem12;\r\n    private javax.swing.JMenuItem jMenuItem14;\r\n    private javax.swing.JMenuItem jMenuItem15;\r\n    private javax.swing.JMenuItem jMenuItem16;\r\n    private javax.swing.JMenuItem jMenuItem17;\r\n    private javax.swing.JMenuItem jMenuItem18;\r\n    private javax.swing.JMenuItem jMenuItem19;\r\n    private javax.swing.JMenuItem jMenuItem2;\r\n    private javax.swing.JMenuItem jMenuItem3;\r\n    private javax.swing.JMenuItem jMenuItem4;\r\n    private javax.swing.JMenuItem jMenuItem5;\r\n    private javax.swing.JMenuItem jMenuItem6;\r\n    private javax.swing.JMenuItem jMenuItem7;\r\n    private javax.swing.JMenuItem jMenuItem8;\r\n    private javax.swing.JMenuItem jMenuItem9;\r\n    private javax.swing.JPanel jPanel1;\r\n    private javax.swing.JScrollPane jScrollPane1;\r\n    private javax.swing.JPopupMenu.Separator jSeparator1;\r\n    private javax.swing.JPopupMenu.Separator jSeparator2;\r\n    private javax.swing.JPopupMenu.Separator jSeparator3;\r\n    private javax.swing.JPopupMenu.Separator jSeparator4;\r\n    private javax.swing.JTextPane textbox;\r\n    \/\/ End of variables declaration\/\/GEN-END:variables\r\n}<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Program 1 \/* * 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. *\/&#46;&#46;&#46;<\/p>\n","protected":false},"author":86671,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[7345,24755,24757,29859,22479,31615,31616,30243],"class_list":["post-135092","post","type-post","status-publish","format-standard","hentry","category-java","tag-java","tag-java-notepad","tag-java-notepad-project","tag-java-practical","tag-java-project","tag-java-project-on-notepad","tag-notepad","tag-notepad-using-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Java Project - How to Design a NotePad - DataFlair<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/java-notepad-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Project - How to Design a NotePad - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Program 1 \/* * 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. *\/&#046;&#046;&#046;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/java-notepad-project\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-27T13:29:07+00:00\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java Project - How to Design a NotePad - DataFlair","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/","og_locale":"en_US","og_type":"article","og_title":"Java Project - How to Design a NotePad - DataFlair","og_description":"Program 1 \/* * 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. *\/&#46;&#46;&#46;","og_url":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2024-04-27T13:29:07+00:00","author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49"},"headline":"Java Project &#8211; How to Design a NotePad","datePublished":"2024-04-27T13:29:07+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/"},"wordCount":10,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"keywords":["Java","java notepad","java notepad project","java practical","java project","java project on notepad","notepad","notepad using java"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/java-notepad-project\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/","url":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/","name":"Java Project - How to Design a NotePad - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"datePublished":"2024-04-27T13:29:07+00:00","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/java-notepad-project\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/java-notepad-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Java Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/java\/"},{"@type":"ListItem","position":3,"name":"Java Project &#8211; How to Design a NotePad"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49","name":"TechVidvan Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","caption":"TechVidvan Team"},"description":"TechVidvan Team provides high-quality content &amp; courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.","url":"https:\/\/data-flair.training\/blogs\/author\/test001\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/135092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/86671"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=135092"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/135092\/revisions"}],"predecessor-version":[{"id":136588,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/135092\/revisions\/136588"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=135092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=135092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=135092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}