file reader

file reader

import javax.swing.JApplet; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JPasswordField; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField;

import javax.swing.SwingUtilities; import java.awt.*; import java.awt.event.*;

import javax.swing.*; import javax.swing.border.*; import java.io.FileReader;

  public class gui extends JApplet {

{

 final JTextPane pane = new JTextPane();


    JFrame frame = new JFrame("filedemo");
    frame.setVisible(true);
    frame.setSize(200,200);

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 


    JLabel label = new JLabel("Enter the filename with file path:");


    JLabel label2= new JLabel("Press the button");

    JPanel panel = new JPanel();
    frame.add(panel);
    panel.add(label);
    panel.add(label2);



    JButton b1 = new JButton("file1");
    panel.add(b1); 


    JButton b2 = new JButton("file2");
    panel.add(b2); 

    JButton b3 = new JButton("Quit");
    panel.add(b3);

    JLabel label1= new JLabel("Supervisor");
    panel.add(label1);

    JLabel label3= new JLabel("Student");
    panel.add(label3);




    // button to insert an icon
    final ImageIcon icon11 = new ImageIcon("bluepaw.gif");
    JButton iconButton1 = new JButton(icon11);
    iconButton1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent event) {
        pane.insertIcon(icon11);
      } 
      });

}

}

hi friend,i am using eclipse software.my question is :how to write filepath for JButton.and also how to open that filepath .Thanking in advance.bala

View Answers









Related Tutorials/Questions & Answers:
file reader
file reader  import javax.swing.JApplet; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import... with file path:"); JLabel label2= new JLabel("Press the button"); JPanel
Java file byte reader
Java file byte reader  I am looking for an example program in Java for reading the bytes. More specifically I need java file byte reader example code... example for Reading file into byte array Reading a File into a Byte Array
Advertisements
ModuleNotFoundError: No module named 'nessus-file-reader'
ModuleNotFoundError: No module named 'nessus-file-reader'  Hi, My... named 'nessus-file-reader' How to remove the ModuleNotFoundError: No module named 'nessus-file-reader' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'random-access-file-reader'
ModuleNotFoundError: No module named 'random-access-file-reader'  Hi...: No module named 'random-access-file-reader' How to remove the ModuleNotFoundError: No module named 'random-access-file-reader' error? Thanks  
ModuleNotFoundError: No module named 'text-file-reader'
ModuleNotFoundError: No module named 'text-file-reader'  Hi, My... named 'text-file-reader' How to remove the ModuleNotFoundError: No module named 'text-file-reader' error? Thanks   Hi, In your
File Reader example in JRuby
File Reader example in JRuby   ... to Read File in JRuby. We can read and write file on the console  or in a file with the JRuby. Here in our example we are reading a text file and printing
Java file line reader
Java file line reader In this section, you will learn how to read a particular line from file. Sometimes you want to read a particular line from the file but you have to read the whole file for this process. So in order to remove
Barcode reader
Barcode reader  hi all, i wont to operation in the out put from Barcode reader. dose java support Barcode reader`s result
PDF reader in android - JavaMail
PDF reader in android  Hi, iam trying to open and perform basic operations on PDF file in android. But i unable to get it. IS there any possibilities to solve that problem? Waiting for reply
ModuleNotFoundError: No module named 'reader'
ModuleNotFoundError: No module named 'reader'  Hi, My Python... 'reader' How to remove the ModuleNotFoundError: No module named 'reader'... to install padas library. You can install reader python with following command
Java IO Reader
the contents of file used the read() method of Reader class. Source CodeADS_TO_REPLACE_3...Java IO Reader In this section we will discuss about the Reader class in Java. Reader class is an abstract class in java.io package provided for reading
Gobits Reader
Gobits Reader       Gobits Reader is a lightweight, web-based news reader on steroids, combined with a powerful blog creator. They are also supplying a built-in webmail that is one
File
File  How to create .Exe file in jana
file
file  how can copy the information in the file to the string?   Store file data into String
file
file  Could anyone please help me to write a code that does the following: Opens a file named MyName.txt, reads the first line from the file and displays it, and then closes the file. Thank you so much
file
file  how can add the information to the graphic file
file
file  Hi,what can delet some of the information of the file
file
file  Hi,how can delet some of the information of the file
File
File   How to find all files in our local computer using java
FILE
FILE  There is a file named Name.txt that contains information related to appliances.I want to read the contents of this file and I used the code... args[]) { try { File file=new File("Name.txt"); FileReader f=new FileReader(file
com.pixelmed.dicom.DicomException: No reader for jpeg-lossless available
com.pixelmed.dicom.DicomException: No reader for jpeg-lossless available   com.pixelmed.dicom.DicomException: No reader for jpeg-lossless available
file
file  hi i want read special line of file. what am i doing ? I write... read data from file. please help me! void maketree(BtNode root,int i) throws... at the following link: Read specific line from file
barcode reader using jsp
barcode reader using jsp  HI ALL, I need jsp code for barcode reader.When we scan the barcode image that barcode value will be stored in one textbox automatically. please helpe me. Regards Bhanu
ModuleNotFoundError: No module named 'bgen-reader'
ModuleNotFoundError: No module named 'bgen-reader'  Hi, My Python... 'bgen-reader' How to remove the ModuleNotFoundError: No module named 'bgen-reader' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'cary-reader'
ModuleNotFoundError: No module named 'cary-reader'  Hi, My Python... 'cary-reader' How to remove the ModuleNotFoundError: No module named 'cary-reader' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'cary-reader'
ModuleNotFoundError: No module named 'cary-reader'  Hi, My Python... 'cary-reader' How to remove the ModuleNotFoundError: No module named 'cary-reader' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'config-reader'
ModuleNotFoundError: No module named 'config-reader'  Hi, My... 'config-reader' How to remove the ModuleNotFoundError: No module named 'config-reader' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'dexcom_reader'
ModuleNotFoundError: No module named 'dexcom_reader'  Hi, My... 'dexcom_reader' How to remove the ModuleNotFoundError: No module named 'dexcom_reader' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'domestic-reader'
ModuleNotFoundError: No module named 'domestic-reader'  Hi, My... named 'domestic-reader' How to remove the ModuleNotFoundError: No module named 'domestic-reader' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'fasta-reader'
ModuleNotFoundError: No module named 'fasta-reader'  Hi, My Python... 'fasta-reader' How to remove the ModuleNotFoundError: No module named 'fasta-reader' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'fec-reader'
ModuleNotFoundError: No module named 'fec-reader'  Hi, My Python... 'fec-reader' How to remove the ModuleNotFoundError: No module named 'fec-reader' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'fec-reader'
ModuleNotFoundError: No module named 'fec-reader'  Hi, My Python... 'fec-reader' How to remove the ModuleNotFoundError: No module named 'fec-reader' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'fitbit-reader'
ModuleNotFoundError: No module named 'fitbit-reader'  Hi, My... 'fitbit-reader' How to remove the ModuleNotFoundError: No module named 'fitbit-reader' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'gdacs-reader'
ModuleNotFoundError: No module named 'gdacs-reader'  Hi, My Python... 'gdacs-reader' How to remove the ModuleNotFoundError: No module named 'gdacs-reader' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'get-reader'
ModuleNotFoundError: No module named 'get-reader'  Hi, My Python... 'get-reader' How to remove the ModuleNotFoundError: No module named 'get-reader' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'get-reader'
ModuleNotFoundError: No module named 'get-reader'  Hi, My Python... 'get-reader' How to remove the ModuleNotFoundError: No module named 'get-reader' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'json-reader'
ModuleNotFoundError: No module named 'json-reader'  Hi, My Python... 'json-reader' How to remove the ModuleNotFoundError: No module named 'json-reader' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'kyoto-reader'
ModuleNotFoundError: No module named 'kyoto-reader'  Hi, My Python... 'kyoto-reader' How to remove the ModuleNotFoundError: No module named 'kyoto-reader' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'lfp-reader'
ModuleNotFoundError: No module named 'lfp-reader'  Hi, My Python... 'lfp-reader' How to remove the ModuleNotFoundError: No module named 'lfp-reader' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'lfp-reader'
ModuleNotFoundError: No module named 'lfp-reader'  Hi, My Python... 'lfp-reader' How to remove the ModuleNotFoundError: No module named 'lfp-reader' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'LHCO_reader'
ModuleNotFoundError: No module named 'LHCO_reader'  Hi, My Python... 'LHCO_reader' How to remove the ModuleNotFoundError: No module named 'LHCO_reader' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'list_reader'
ModuleNotFoundError: No module named 'list_reader'  Hi, My Python... 'list_reader' How to remove the ModuleNotFoundError: No module named 'list_reader' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'Log-Reader'
ModuleNotFoundError: No module named 'Log-Reader'  Hi, My Python... 'Log-Reader' How to remove the ModuleNotFoundError: No module named 'Log-Reader' error? Thanks   Hi, In your python environment you
ModuleNotFoundError: No module named 'magic_reader'
ModuleNotFoundError: No module named 'magic_reader'  Hi, My Python... 'magic_reader' How to remove the ModuleNotFoundError: No module named 'magic_reader' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'mesa_reader'
ModuleNotFoundError: No module named 'mesa_reader'  Hi, My Python... 'mesa_reader' How to remove the ModuleNotFoundError: No module named 'mesa_reader' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'meter-reader'
ModuleNotFoundError: No module named 'meter-reader'  Hi, My Python... 'meter-reader' How to remove the ModuleNotFoundError: No module named 'meter-reader' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'multipart-reader'
ModuleNotFoundError: No module named 'multipart-reader'  Hi, My... named 'multipart-reader' How to remove the ModuleNotFoundError: No module named 'multipart-reader' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'multipart-reader'
ModuleNotFoundError: No module named 'multipart-reader'  Hi, My... named 'multipart-reader' How to remove the ModuleNotFoundError: No module named 'multipart-reader' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'parc-reader'
ModuleNotFoundError: No module named 'parc-reader'  Hi, My Python... 'parc-reader' How to remove the ModuleNotFoundError: No module named 'parc-reader' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'paras-reader'
ModuleNotFoundError: No module named 'paras-reader'  Hi, My Python... 'paras-reader' How to remove the ModuleNotFoundError: No module named 'paras-reader' error? Thanks   Hi, In your python

Ads