Search code examples
javaswinguser-interfacebufferedreader

How can I display images and different variables depends on some conditions in this code?


I am learning java and i am pretty new for it. I am trying to create a static profile window using swing. Also, the avatar picture should change depending on user and user information should be read from a text file. This code doesnt give a error but its because of avatarPath. I think the program thinks its non-static.

import java.io.*;
import java.io.IOException;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;


/**
 *
 * @author B_Ali
 */
public class ProfilePanel extends javax.swing.JFrame {
    public static String avatarPath;
    public static int x;  
    public static class UsersInfo{
    public int userID;    
    public String userName;
    public String userSurname;
    public String userGender;

UsersInfo(String name, String surname, String gender){         
        userID = x;
        userName = name;
        userSurname = surname;
        userGender = gender;
}
}
static UsersInfo permitedUser[];
public static void InfoReader()throws IOException{
       @SuppressWarnings("UnusedAssignment")
       BufferedReader in = null;
    try {
        in = new BufferedReader(
                new FileReader("C:\\Users\\B_Ali\\Documents\\NetBeansProjects\\JavaApplication20\\UserInformation.txt"));
        String s, s2 = new String();
        while((s = in.readLine())!= null)
            s2 += s + "\n";
        @SuppressWarnings("UnusedAssignment")

                String[] s1 = new String[100];
        s1 = s2.split("\\s+");
        in.close();
        permitedUser[0] = new UsersInfo( s1[0] , s1[1], s1[2] );
        permitedUser[1] = new UsersInfo ( s1[3], s1[4], s1[5] );
        permitedUser[2] = new UsersInfo ( s1[6], s1[7], s1[8] );

    } catch (FileNotFoundException ex) {
        Logger.getLogger(ProfilePanel.class.getName()).log(Level.SEVERE, null, ex);
    } finally {

    }
}
public static void ProfilePanel() {
    initComponents();
}
public static String AvatarPic(){

    if( x == 0 ){
    avatarPath = "\"/Users/hei_cosplay_darker_than_black_by_seras0victoria.jpg\"";
    }
    else if( x == 1 ){
    avatarPath = "\"/Users/lyralei_the_windrunner_by_trungth-d5zhmc1.jpg\"";    
    }
    else if( x == 2 ){
    avatarPath = "\"/Users/shingeki_no_kyojin_by_asuka10-d6k762k.jpg\""; 
    }
    return avatarPath;}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    jFrame1 = new javax.swing.JFrame();
    jFrame2 = new javax.swing.JFrame();
    jPanel1 = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();

    javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
    jFrame1.getContentPane().setLayout(jFrame1Layout);
    jFrame1Layout.setHorizontalGroup(
        jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGap(0, 400, Short.MAX_VALUE)
    );
    jFrame1Layout.setVerticalGroup(
        jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGap(0, 300, Short.MAX_VALUE)
    );

    javax.swing.GroupLayout jFrame2Layout = new javax.swing.GroupLayout(jFrame2.getContentPane());
    jFrame2.getContentPane().setLayout(jFrame2Layout);
    jFrame2Layout.setHorizontalGroup(
        jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGap(0, 400, Short.MAX_VALUE)
    );
    jFrame2Layout.setVerticalGroup(
        jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGap(0, 300, Short.MAX_VALUE)
    );

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Avatar", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

    jLabel1.setForeground(new java.awt.Color(255, 255, 255));
    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(ProfilePanel.AvatarPic())));
    jLabel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(255, 255, 255), 2, true));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jPanel1Layout.createSequentialGroup()
            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 0, Short.MAX_VALUE))
    );

    jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Information", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Tahoma", 1, 12))); // NOI18N

    jScrollPane2.setName(""); // NOI18N

    jTextArea1.setEditable(false);
    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    try {
        ProfilePanel.InfoReader();      // TODO add your handling code here:
    } catch (IOException ex) {
        Logger.getLogger(ProfilePanel.class.getName()).log(Level.SEVERE, null, ex);
    }
    jTextArea1.setText("Name: " +permitedUser[x].userName+ "\r\nSurname :"+permitedUser[x].userSurname+"\r\nGender :"+permitedUser[x].userGender);
    jTextArea1.setDragEnabled(true);
    jTextArea1.setMaximumSize(new java.awt.Dimension(2147483647, 120));
    jTextArea1.setMinimumSize(new java.awt.Dimension(92, 120));
    jTextArea1.setPreferredSize(new java.awt.Dimension(164, 120));
    jScrollPane2.setViewportView(jTextArea1);

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
            .addGap(0, 0, 0)
            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 0, 0))
    );
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING)
    );

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addGap(50, 50, 50)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(50, 50, 50))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(layout.createSequentialGroup()
            .addGap(27, 27, 27)
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addContainerGap(120, Short.MAX_VALUE))
    );

    pack();
}// </editor-fold>                        


public static void main(String args[]) {
    /* Set the Nimbus look and feel */
    //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* 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 
     */
    Scanner in = new Scanner(System.in);
    x = in.nextInt();

    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(ProfilePanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        java.util.logging.Logger.getLogger(ProfilePanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        java.util.logging.Logger.getLogger(ProfilePanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(ProfilePanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    //</editor-fold>

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(new Runnable() {
        public void run() {
            new ProfilePanel().setVisible(true);
        }
    });


}

// Variables declaration - do not modify                     
private javax.swing.JFrame jFrame1;
private javax.swing.JFrame jFrame2;
public javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel2;
public javax.swing.JScrollPane jScrollPane2;
public javax.swing.JTextArea jTextArea1;
// End of variables declaration                   
}

Edit: I changed code a bit and it gives error. Edit2: what I am trying to do is creating users and their profiles. Profile will contain avatar image and 3 variable which are name, surname and gender. I want to display them with respect to users.

I am living problems with this codes;

static void AvatarPic(){ 
    if( x == 0 ){
    avatarPath = "\"/Users/hei_cosplay_darker_than_black_by_seras0victoria.jpg\"";
    }
    else if( x == 1 ){
    avatarPath = "\"/Users/lyralei_the_windrunner_by_trungth-d5zhmc1.jpg\"";    
    }
    else if( x == 2 ){
    avatarPath = "\"/Users/shingeki_no_kyojin_by_asuka10-d6k762k.jpg\""; 
    }
    }

and

ProfilePanel.AvatarPic();
jLabel1.setIcon(new
javax.swing.ImageIcon(getClass().getResource(ProfilePanel.avatarPath)));

Solution

  • There are many problems in your code.

    1. The initComponents() is not a static function .I guess in your static conversion you just replaced every function with public static .And the below is a constructor [I'm sure because it is a Netbeans generated one] and you have modified it also.No need to do that

       public static void ProfilePanel() {
         initComponents();
        }
      

      You can change it back to the way it was

      public ProfilePanel() {
        initComponents();
       }
      
    2. You'll get a java.lang.NullPointerException at

      jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(ProfilePanel.AvatarPic())));
      

      because if you are using getResource you just have to specify the filename relative to the package.If you'll be loading from other location,then you have to change it like

      jLabel1.setIcon(new javax.swing.ImageIcon(ProfilePanel.AvatarPic()));//file location
      

      Also you have to give the absolute path

      avatarPath = "D://hei_cosplay_darker_than_black_by_seras0victoria.jpg";
      
    3. You'll again get a java.lang.NullPointerException at

      permitedUser[0] = new UsersInfo(s1[0], s1[1], s1[2]);
      

      because you haven't initialized the permitedUser anywhere.So you have to do it like

      static UsersInfo permitedUser[]=new UsersInfo[3];
      

    After making those changes and if you run it with 0 then BK201[Code Name Hei] will be on your screen

    And Your Edited FullCode[Make change to ImageLocations]

    import java.io.*;
    import java.io.IOException;
    import java.util.Scanner;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    
    /**
     *
     * @author B_Ali
     */
    public class ProfilePanel extends javax.swing.JFrame {
    
    public static String avatarPath;
    public static int x;
    
    public static class UsersInfo {
    
        public int userID;
        public String userName;
        public String userSurname;
        public String userGender;
    
        UsersInfo(String name, String surname, String gender) {
            userID = x;
            userName = name;
            userSurname = surname;
            userGender = gender;
        }
    }
    static UsersInfo permitedUser[] = new UsersInfo[3];//change 3
    
    public static void InfoReader() throws IOException {
        @SuppressWarnings("UnusedAssignment")
        BufferedReader in = null;
        try {
            in = new BufferedReader(
                    new FileReader("C:\\Users\\B_Ali\\Documents\\NetBeansProjects\\JavaApplication20\\UserInformation.txt"));
            String s, s2 = new String();
            while ((s = in.readLine()) != null) {
                s2 += s + "\n";
            }
            @SuppressWarnings("UnusedAssignment")
    
            String[] s1 = new String[100];
            s1 = s2.split("\\s+");
            in.close();
            permitedUser[0] = new UsersInfo(s1[0], s1[1], s1[2]);
            permitedUser[1] = new UsersInfo(s1[3], s1[4], s1[5]);
            permitedUser[2] = new UsersInfo(s1[6], s1[7], s1[8]);
    
        } catch (FileNotFoundException ex) {
            Logger.getLogger(ProfilePanel.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
    
        }
    }
    //Change 1
    public ProfilePanel() {
        initComponents();
    }
    
    public static String AvatarPic() {
    //change 2
        if (x == 0) {
            avatarPath = "D://hei_cosplay_darker_than_black_by_seras0victoria.jpg";
        } else if (x == 1) {
            avatarPath = "D://lyralei_the_windrunner_by_trungth-d5zhmc1.jpg";
        } else if (x == 2) {
            avatarPath = "D://shingeki_no_kyojin_by_asuka10-d6k762k.jpg";
        }
        return avatarPath;
    }
    
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
        private void initComponents() {
    
        jFrame1 = new javax.swing.JFrame();
        jFrame2 = new javax.swing.JFrame();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
    
        javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
        jFrame1.getContentPane().setLayout(jFrame1Layout);
        jFrame1Layout.setHorizontalGroup(
                jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
        );
        jFrame1Layout.setVerticalGroup(
                jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
        );
    
        javax.swing.GroupLayout jFrame2Layout = new javax.swing.GroupLayout(jFrame2.getContentPane());
        jFrame2.getContentPane().setLayout(jFrame2Layout);
        jFrame2Layout.setHorizontalGroup(
                jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
        );
        jFrame2Layout.setVerticalGroup(
                jFrame2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
        );
    
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    
        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Avatar", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
    
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    
       //Change 2
        jLabel1.setIcon(new javax.swing.ImageIcon(ProfilePanel.AvatarPic()));
        jLabel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(255, 255, 255), 2, true));
    
        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
        );
    
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Information", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
    
        jScrollPane2.setName(""); // NOI18N
    
        jTextArea1.setEditable(false);
        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        try {
            ProfilePanel.InfoReader();      // TODO add your handling code here:
        } catch (IOException ex) {
            Logger.getLogger(ProfilePanel.class.getName()).log(Level.SEVERE, null, ex);
        }
        jTextArea1.setText("Name: " + permitedUser[x].userName + "\r\nSurname :" + permitedUser[x].userSurname + "\r\nGender :" + permitedUser[x].userGender);
        jTextArea1.setDragEnabled(true);
        jTextArea1.setMaximumSize(new java.awt.Dimension(2147483647, 120));
        jTextArea1.setMinimumSize(new java.awt.Dimension(92, 120));
        jTextArea1.setPreferredSize(new java.awt.Dimension(164, 120));
        jScrollPane2.setViewportView(jTextArea1);
    
        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGap(0, 0, 0)
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, 0))
        );
        jPanel2Layout.setVerticalGroup(
                jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING)
        );
    
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                        .addGap(50, 50, 50)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(50, 50, 50))
        );
        layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                        .addGap(27, 27, 27)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addContainerGap(120, Short.MAX_VALUE))
        );
    
        pack();
    }// </editor-fold>                        
    
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
    /* 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 
         */
        Scanner in = new Scanner(System.in);
        x = in.nextInt();
    
        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(ProfilePanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ProfilePanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ProfilePanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ProfilePanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
    
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ProfilePanel().setVisible(true);
            }
        });
    
    }
    
    // Variables declaration - do not modify   
    
    private javax.swing.JFrame jFrame1;
    private javax.swing.JFrame jFrame2;
    public javax.swing.JLabel jLabel1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    public javax.swing.JScrollPane jScrollPane2;
    public javax.swing.JTextArea jTextArea1;
    // End of variables declaration                   
    }