Any help with this program (a bit of a problem with static references)

Can anyone give me any suggestions for fixing this code:
package vivarium;
import javax.swing.JApplet;
import javax.swing.JFrame;
import java.awt.*;
import java.applet.*;
import java.net.*;
public class Render extends java.applet.Applet {
     static Animal[] animal_array_world;
     public static void main(String s[])  {
          JFrame frame = null;
          Graphics g = null;
          int[][] grassarray = new int[16][16];
          createapplet(frame);
          Render r = new Render();
          r.rendergrass(g, grassarray);
          frame.paint(g);
          //createcreatures(20);
          //live();
     public void rendergrass(Graphics g, int[][] array) {
          URL codebase = getCodeBase();
          java.awt.Image grass =  getImage(codebase, "grass.JPG");
          java.awt.Image deadgrass =  getImage(codebase, "deadgrass.JPG");
          for(int i = 0; i < 16; i++)
               for(int j = 0; j < 16; j++) {
                    int y = (i * 16);
                    int x = (j * 16);
               if(array[i][j] == 0) {
                    drawimage(g, grass, y, x);
               else
                    drawimage(g, deadgrass, y, x);
     public  void drawimage(Graphics g, java.awt.Image img, int y, int x) {
          g.drawImage(img, y, x, this);
     public static void createapplet(JFrame frame) {
          frame = new JFrame();
          frame.setTitle("Kirby's Vivarium Demo");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          JApplet applet = new RenderApplet();
          applet.init();
          frame.getContentPane().add(applet);
          frame.pack();
          frame.setVisible(true);
     //this creates an array of creatures
     public static void createcreatures(int x) {
          animal_array_world = new Animal[x*2];
     //this will than act on that
     public static void live() {
          while(true) {
          int i = 0;
          while(i != animal_array_world.length - 1) {
               animal_array_world.live(animal_array_world);
The problem seems to be with
URL codebase = getCodeBase();
java.awt.Image grass =  getImage(codebase, "grass.JPG");
java.awt.Image deadgrass =  getImage(codebase, but I do not get how. This is a non-static field, but no matter what I do it seems to complain in some manner. Does anyone have any suggestions? Thanks!

Exception in thread "main" java.lang.NullPointerException
     at java.applet.Applet.getCodeBase(Unknown Source)
     at vivarium.Render.rendergrass(Render.java:29)
     at vivarium.Render.main(Render.java:20)I get this despite whether I put the getCodeBase part in a method, the main or the initialization block.
Heres line 29: URL codebase = getCodeBase();This is called within my nonstatic method rendergrass.
And heres line 20: r.rendergrass(g, grassarray);(Where r is a new Render class object)

Similar Messages

  • Every time I try to install itunes on my PC I get the following message, and I can't seem to find a solution. Any help out there?? "There is a problem with this Windows Installer package. A program required for this install to complete could not be run."

    Every time I try to install itunes on my PC I get the following message, and I can't seem to find a solution. Any help out there?? "There is a problem with this Windows Installer package. A program required for this install to complete could not be run."

    Try the following user tip:
    "There is a problem with this Windows Installer package ..." error messages when installing iTunes for Windows

  • Need help fixing a bug with this program...

    I've been working for hours trying to fix the bug I have with this program...
    http://ss.majinnet.com/AccountManager.java - This is the source code of my program
    http://ss.majinnet.com/Dalzhim.jpg - This is an image used inside the program
    http://ss.majinnet.com/sphereaccu.scp - This is a text file you need to use the program
    First of all, to know what bug I am talking about.. You will need to download those 3 files.. Then you can compile AccountManager.java and run it.. When the program has opened, go into: File -> Open Account File
    and browse until you can open up the text file sphereaccu.scp ... Then there should be a list of names appearing on the left, and when you select any, there will be variables appearing in the TextFields on the right. When that's done, all you have to do to see where the bugs are is to use the options: Edit -> Create New Account as well as Edit -> Remove Account ... When you use the Create New Account option for the first time, it works fine.. But when you use it a second time, errors are appearing on the console (can't find what generates those errors...). And the biggest problem is that when you use the Remove Account option, it doesn't remove the selected account, and over that it generates errors in the console as well...
    If anyone can help me fix those errors, I'd be very grateful !

    won't pretend to understand everything or why you do somethings, but FWIW,
    //package Dalzhim.AccountManager;
    import java.io.*;
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    public class AccountManager
          JFrame window;
          Container mainPane;
          JSplitPane splitPane;
          JPanel leftPane,rightPane;
          JList accountList;
          JTextField accountName,plevel,priv,password,totaltime,lasttime,lastchar,firstconnect;
          JTextField firstIP,lastconnect,lastIP,lang;
          JLabel label1,label2,label3,label4,label5,label6,label7,label8,label9,label10,label11,label12;
          JMenuBar menuBar;
          JMenu file,edit,end;
          JMenuItem open,save,quit,create,remove,search,ab;
          JFileChooser jfc,jfcs;
          JButton searchButton,createButton;
          JTextField searchString,newName,newPassword,newPLevel;
          JDialog searchWindow,createWindow;
          File accountFile = null;
          File savingFile = null;
          FileInputStream fis;
          StringTokenizer st;
          String content;
          String lastSearch = "";
          String[] strings,lines;
          String[] parameters,arguments;
          Vector accountNames;
          Hashtable plevels,privs,passwords,totaltimes,lasttimes,lastchars,firstconnects;
          Hashtable firstIPs,lastconnects,lastIPs,langs;
          String newline = "";
          int[] activated;
          int lastSelection = -1;
          AL al;
          LL ll;
          public static void main(String args[])
          AccountManager am = new AccountManager();
          public AccountManager()
          al = new AL();
          ll = new LL();
          window = new JFrame("Account Manager");
          mainPane = window.getContentPane();
          leftPane = new JPanel();
          rightPane = new JPanel();
          leftPane.setLayout(new GridLayout(1,1,5,5));
          rightPane.setLayout(null);
          splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,leftPane,rightPane);
          mainPane.setLayout(new GridLayout(1,1,5,5));
          mainPane.add(splitPane);
          menuBar = new JMenuBar();
          file = new JMenu("File");
          edit = new JMenu("Edit");
          end = new JMenu("?");
          menuBar.add(file);
          menuBar.add(edit);
          menuBar.add(end);
          open = new JMenuItem("Open Account File");
          open.addActionListener(al);
          file.add(open);
          save = new JMenuItem("Save Account File");
          save.addActionListener(al);
          file.add(save);
          quit = new JMenuItem("Quit");
          quit.addActionListener(al);
          file.add(quit);
          create = new JMenuItem("Create New Account");
          create.addActionListener(al);
          edit.add(create);
          remove = new JMenuItem("Remove Selected Account");
          remove.addActionListener(al);
          edit.add(remove);
          search = new JMenuItem("Search");
          search.addActionListener(al);
          edit.add(search);
          ab = new JMenuItem("About");
          ab.addActionListener(al);
          end.add(ab);
          window.setJMenuBar(menuBar);
          accountList = new JList();
          accountList.addListSelectionListener(ll);
          leftPane.add(new JScrollPane(accountList));
          accountName = new JTextField(50);
          plevel = new JTextField(50);
          priv = new JTextField(50);
          password = new JTextField(50);
          totaltime = new JTextField(50);
          lasttime = new JTextField(50);
          lastchar = new JTextField(50);
          firstconnect = new JTextField(50);
          firstIP = new JTextField(50);
          lastconnect = new JTextField(50);
          lastIP = new JTextField(50);
          lang = new JTextField(50);
          label1 = new JLabel("Account Name:");
          label2 = new JLabel("Player Level:");
          label3 = new JLabel("Priv Level:");
          label4 = new JLabel("Password:");
          label5 = new JLabel("Total Connected Time:");
          label6 = new JLabel("Last Connected Time:");
          label7 = new JLabel("Last Character Used:");
          label8 = new JLabel("First Connect Data:");
          label9 = new JLabel("First Connected IP:");
          label10 = new JLabel("Last Connected Date:");
          label11 = new JLabel("Last Connected IP:");
          label12 = new JLabel("Language:");
          rightPane.add(accountName);
          rightPane.add(plevel);
          rightPane.add(priv);
          rightPane.add(password);
          rightPane.add(totaltime);
          rightPane.add(lasttime);
          rightPane.add(lastchar);
          rightPane.add(firstconnect);
          rightPane.add(firstIP);
          rightPane.add(lastconnect);
          rightPane.add(lastIP);
          rightPane.add(lang);
          rightPane.add(label1);
          rightPane.add(label2);
          rightPane.add(label3);
          rightPane.add(label4);
          rightPane.add(label5);
          rightPane.add(label6);
          rightPane.add(label7);
          rightPane.add(label8);
          rightPane.add(label9);
          rightPane.add(label10);
          rightPane.add(label11);
          rightPane.add(label12);
          label1.setBounds(10,10,150,25);
          accountName.setBounds(175,10,200,25);
          label2.setBounds(10,40,150,25);
          plevel.setBounds(175,40,200,25);
          label3.setBounds(10,70,150,25);
          priv.setBounds(175,70,200,25);
          label4.setBounds(10,100,150,25);
          password.setBounds(175,100,200,25);
          label5.setBounds(10,130,150,25);
          totaltime.setBounds(175,130,200,25);
          label6.setBounds(10,160,150,25);
          lasttime.setBounds(175,160,200,25);
          label7.setBounds(10,190,150,25);
          lastchar.setBounds(175,190,200,25);
          label8.setBounds(10,220,150,25);
          firstconnect.setBounds(175,220,200,25);
          label9.setBounds(10,250,150,25);
          firstIP.setBounds(175,250,200,25);
          label10.setBounds(10,280,150,25);
          lastconnect.setBounds(175,280,200,25);
          label11.setBounds(10,310,150,25);
          lastIP.setBounds(175,310,200,25);
          label12.setBounds(10,340,150,25);
          lang.setBounds(175,340,200,25);
          Dimension rightdim = new Dimension(380,425);
          rightPane.setMinimumSize(rightdim);
          window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          window.pack();
          window.setSize(550,425);
          window.setResizable(false);
          window.setVisible(true);
          public void openAccountFile()
          byte[] b = null;
          try
             fis = new FileInputStream(accountFile);
             b = new byte[fis.available()];
             fis.read(b,0,fis.available());
          catch(FileNotFoundException e)
          catch(IOException e)
          content = new String(b);
          newline = String.valueOf(content.charAt(content.indexOf("\n")));
          parseAccountFile();
          public void parseAccountFile()
          StringTokenizer st = new StringTokenizer(content, "[");
          strings = new String[st.countTokens()];
          createArrays();
          for (int i=0;i<strings.length;i++)
             strings[i] = st.nextToken();
          for(int i=0;i<strings.length;i++)
             parseAccountParameters(i);
          sort();
          public void parseAccountParameters(int which)
          StringTokenizer st = new StringTokenizer(strings[which],"\n");
          lines = new String[st.countTokens()];
          for(int i=0;i<lines.length;i++)
             lines[i] = st.nextToken();
          parameters = new String[lines.length];
          arguments = new String[lines.length];
          accountNames.add(getAccountName(lines[0]));
          for(int i=1;i<lines.length;i++)
             parseAccountParameter(i,which);
          public void parseAccountParameter(int which,int strings)
          StringTokenizer st = new StringTokenizer(lines[which],"=");
          parameters[which] = st.nextToken();
          if(st.hasMoreTokens())
             arguments[which] = st.nextToken();
          stockValues(strings);
          public void stockValues(int a)
          for(int i=0;i<parameters.length;i++)
             if(arguments!=null)
         if(parameters[i].equals("PLEVEL"))
              plevels.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("PRIV"))
              privs.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("PASSWORD"))
              passwords.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("TOTALCONNECTTIME"))
              totaltimes.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("LASTCONNECTTIME"))
              lasttimes.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("LASTCHARUID"))
              lastchars.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("FIRSTCONNECTDATE"))
              firstconnects.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("FIRSTIP"))
              firstIPs.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("LASTCONNECTDATE"))
              lastconnects.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("LASTIP"))
              lastIPs.put(accountNames.get(a),arguments[i]);
         else if(parameters[i].equals("LANG"))
              langs.put(accountNames.get(a),arguments[i]);
    public String getAccountName(String line)
         String name = "";
         for(int i=0;i<line.indexOf("]");i++)
         name = name + (String.valueOf(line.charAt(i)));
         return name;
    public void createArrays()
         accountNames = new Vector();
         plevels = new Hashtable();
         privs = new Hashtable();
         passwords = new Hashtable();
         totaltimes = new Hashtable();
         lasttimes = new Hashtable();
         lastchars = new Hashtable();
         firstconnects = new Hashtable();
         firstIPs = new Hashtable();
         lastconnects = new Hashtable();
         lastIPs = new Hashtable();
         langs = new Hashtable();
    public void showValues()
         if(lastSelection!=-1)
         //keepValues();
         int i = -1 == accountList.getSelectedIndex() ?
         lastSelection :
         accountList.getSelectedIndex();
         accountName.setText((String)accountNames.get( i ));
         plevel.setText((String)plevels.get(accountNames.get( i )));
         priv.setText((String)privs.get(accountNames.get( i )));
         password.setText((String)passwords.get(accountNames.get( i )));
         totaltime.setText((String)totaltimes.get(accountNames.get( i )));
         lasttime.setText((String)lasttimes.get(accountNames.get( i )));
         lastchar.setText((String)lastchars.get(accountNames.get( i )));
         firstconnect.setText((String)firstconnects.get(accountNames.get( i )));
         firstIP.setText((String)firstIPs.get(accountNames.get( i )));
         lastconnect.setText((String)lastconnects.get(accountNames.get( i )));
         lastIP.setText((String)lastIPs.get(accountNames.get( i )));
         lang.setText((String)langs.get(accountNames.get( i )));
         lastSelection = i ;
    public void keepValues()
         accountNames.setElementAt(accountName.getText(),lastSelection);
         plevels.put(accountNames.get(lastSelection),plevel.getText());
         privs.put(accountNames.get(lastSelection),priv.getText());
         passwords.put(accountNames.get(lastSelection),password.getText());
         totaltimes.put(accountNames.get(lastSelection),totaltime.getText());
         lasttimes.put(accountNames.get(lastSelection),lasttime.getText());
         lastchars.put(accountNames.get(lastSelection),lastchar.getText());
         firstconnects.put(accountNames.get(lastSelection),firstconnect.getText());
         firstIPs.put(accountNames.get(lastSelection),firstIP.getText());
         lastconnects.put(accountNames.get(lastSelection),lastconnect.getText());
         lastIPs.put(accountNames.get(lastSelection),lastIP.getText());
         langs.put(accountNames.get(lastSelection),lang.getText());
    public void saveAccountFile()
         keepValues();
         String saving = "";
         for(int i=0;i<strings.length;i++)
         saving = saving + ("["+(String)accountNames.get(i)+"]"+newline);
         if(plevels.get((String)accountNames.get(i))!=null && !(plevels.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("PLEVEL="+plevels.get((String)accountNames.get(i))+newline);
         if(privs.get((String)accountNames.get(i))!=null && !(privs.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("PRIV="+privs.get((String)accountNames.get(i))+newline);
         if(passwords.get((String)accountNames.get(i))!=null && !(passwords.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("PASSWORD="+passwords.get((String)accountNames.get(i))+newline);
         if(totaltimes.get((String)accountNames.get(i))!=null && !(totaltimes.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("TOTALCONNECTTIME="+totaltimes.get((String)accountNames.get(i))+newline);
         if(lasttimes.get((String)accountNames.get(i))!=null && !(lasttimes.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("LASTCONNECTTIME="+lasttimes.get((String)accountNames.get(i))+newline);
         if(lastchars.get((String)accountNames.get(i))!=null && !(lastchars.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("LASTCHARUID="+lastchars.get((String)accountNames.get(i))+newline);
         if(firstconnects.get((String)accountNames.get(i))!=null && !(firstconnects.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("FIRSTCONNECTDATE="+firstconnects.get((String)accountNames.get(i))+newline);
         if(firstIPs.get((String)accountNames.get(i))!=null && !(firstIPs.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("FIRSTIP="+firstIPs.get((String)accountNames.get(i))+newline);
         if(lastconnects.get((String)accountNames.get(i))!=null && !(lastconnects.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("LASTCONNECTDATE="+lastconnects.get((String)accountNames.get(i))+newline);
         if(lastIPs.get((String)accountNames.get(i))!=null && !(lastIPs.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("LASTIP="+lastIPs.get((String)accountNames.get(i))+newline);
         if(langs.get((String)accountNames.get(i))!=null && !(langs.get((String)accountNames.get(i)).equals("")))
         saving = saving + ("LANG="+langs.get((String)accountNames.get(i))+newline);
         saving = saving + newline;
         try
         FileOutputStream fos = new FileOutputStream(savingFile);
         fos.write(saving.getBytes());
         catch(FileNotFoundException e)
         catch(IOException e)
    public void about()
         final JDialog info = new JDialog(window,"About",true);
         Container aboutPane = info.getContentPane();
         aboutPane.setLayout(null);
         Image image = Toolkit.getDefaultToolkit().getImage(getClass().getResource("Dalzhim.jpg"));
         ImageIcon sig = new ImageIcon(image);
         JLabel sign = new JLabel(sig);
         JLabel text1 = new JLabel("AccountManager v0.2Beta");
         JEditorPane text2 = new JEditorPane();
         JEditorPane text3 = new JEditorPane();
         JEditorPane text4 = new JEditorPane();
         JButton close = new JButton("Okay");
         JEditorPane jep = new JEditorPane();
         sign.setBounds(10,0,374,292);
         text1.setBounds(125,300,250,20);
         text2.setBounds(10,350,400,20);
         text3.setBounds(10,400,400,20);
         text4.setBounds(10,450,400,20);
         close.setBounds(150,500,100,20);
         close.addActionListener(new ActionListener()
              public void actionPerformed(ActionEvent e)
              info.setVisible(false);
         text2.setText("Created by �alzhim");
         text3.setText("Dalzhim, also known as, Amlaruil");
         text4.setText("[email protected] - [email protected]");
         text2.setEditable(false);
         text3.setEditable(false);
         text4.setEditable(false);
         text2.setBackground(new Color(207,207,207));
         text3.setBackground(new Color(207,207,207));
         text4.setBackground(new Color(207,207,207));
         aboutPane.add(sign);
         aboutPane.add(text1);
         aboutPane.add(text2);
         aboutPane.add(text3);
         aboutPane.add(text4);
         aboutPane.add(close);
         jep.setBackground(new Color(207,207,207));
         jep.setEditable(false);
         jep.setText("TEST");
         info.pack();
         info.setSize(400,550);
         info.setResizable(false);
         info.setVisible(true);
    public void search()
         searchWindow = new JDialog(window,"Search");
         Container searchPane = searchWindow.getContentPane();
         searchPane.setLayout(null);
         searchString = new JTextField(lastSearch);
         searchButton = new JButton("Search");
         searchString.addActionListener(al);
         searchButton.addActionListener(al);
         searchPane.add(searchString);
         searchPane.add(searchButton);
         searchString.setBounds(10,10,175,25);
         searchButton.setBounds(200,10,100,25);
         searchString.selectAll();
         searchWindow.pack();
         searchWindow.setSize(320,65);
         searchWindow.setResizable(false);
         searchWindow.setVisible(true);
    public void search(String what)
         accountList.setSelectedValue(what,true);
    public void createAccount()
         createWindow = new JDialog(window,"Create New Account");
         Container createPane = createWindow.getContentPane();
         createPane.setLayout(null);
         newName = new JTextField();
         newPassword = new JTextField();
         newPLevel = new JTextField();
         createButton = new JButton("Create Account");
         JLabel createlabel1 = new JLabel("Account Name:");
         JLabel createlabel2 = new JLabel("Account Password:");
         JLabel createlabel3 = new JLabel("Account PLevel:");
         createPane.add(newName);
         createPane.add(newPassword);
         createPane.add(newPLevel);
         createPane.add(createButton);
         createPane.add(createlabel1);
         createPane.add(createlabel2);
         createPane.add(createlabel3);
         newName.addActionListener(al);
         newPassword.addActionListener(al);
         newPLevel.addActionListener(al);
         createButton.addActionListener(al);
         newName.setBounds(160,10,200,25);
         newPassword.setBounds(160,45,200,25);
         newPLevel.setBounds(160,80,200,25);
         createButton.setBounds(160,115,200,25);
         createlabel1.setBounds(10,10,150,25);
         createlabel2.setBounds(10,45,150,25);
         createlabel3.setBounds(10,80,150,25);
         createWindow.pack();
         createWindow.setSize(375,175);
         createWindow.setResizable(false);
         createWindow.setVisible(true);
    public void createProcess()
         String tempname = newName.getText();
         String temppass = newPassword.getText();
         String templeve = newPLevel.getText();
         createWindow.dispose();
         if(!(accountNames.contains(tempname)))
         accountNames.add(tempname);
         sort();
         passwords.put(tempname,temppass);
         plevels.put(tempname,templeve);
         search(newName.getText());
    public void sort()
         Object[] sorting = new Object[accountNames.size()];
         accountNames.toArray(sorting);
         String[] sorting2 = new String[sorting.length];
         for(int i=0;i<sorting.length;i++)
         sorting2[i] = (String)sorting[i];
         Arrays.sort(sorting2,String.CASE_INSENSITIVE_ORDER);
         accountNames.clear();
         for(int i=0;i<sorting2.length;i++)
         accountNames.add(sorting2[i]);
         accountList.setListData(accountNames);
    public void removeAccount()
         if(accountList.getSelectedIndex()==-1)
         JOptionPane.showMessageDialog(window,"You must select an account from the list to use the Remove option");
         else
         int i = accountList.getSelectedIndex();
         System.out.println( "ra: " + i + " an: " + accountNames.elementAt( i ) );
         System.out.println(accountNames.elementAt( i ));
         plevels.remove(accountNames.elementAt( i ));
         privs.remove(accountNames.elementAt( i ));
         passwords.remove(accountNames.elementAt( i ));
         totaltimes.remove(accountNames.elementAt( i ));
         lasttimes.remove(accountNames.elementAt( i ));
         lastchars.remove(accountNames.elementAt( i ));
         firstconnects.remove(accountNames.elementAt( i ));
         firstIPs.remove(accountNames.elementAt( i ));
         lastconnects.remove(accountNames.elementAt( i ));
         lastIPs.remove(accountNames.elementAt( i ));
         langs.remove(accountNames.elementAt( i ));
         accountNames.removeElementAt( i );
         accountList.setListData( accountNames );
         //sort();
         showValues();
    class AL implements ActionListener
         public void actionPerformed(ActionEvent e)
         if(e.getSource()==open)
              jfc = new JFileChooser(accountFile);
              jfc.setDialogTitle("Select your account file");
              jfc.setMultiSelectionEnabled(false);
              jfc.addActionListener(al);
              jfc.showOpenDialog(window);
         else if(e.getSource()==jfc)
              accountFile = jfc.getSelectedFile();
              openAccountFile();
         else if(e.getSource()==save)
              jfcs = new JFileChooser(savingFile);
              jfcs.setDialogTitle("Where do you wish to save?");
              jfcs.setMultiSelectionEnabled(false);
              jfcs.addActionListener(al);
              jfcs.showSaveDialog(window);
         else if(e.getSource()==ab)
              about();
         else if(e.getSource()==jfcs)
              savingFile = jfcs.getSelectedFile();
              saveAccountFile();
         else if(e.getSource()==quit)
              System.exit(-1);
         else if(e.getSource()==search)
              search();
         else if(e.getSource()==searchString)
              searchButton.doClick();
         else if(e.getSource()==searchButton)
              accountList.setSelectedValue(searchString.getText(),true);
              lastSearch = searchString.getText();
              searchWindow.dispose();
         else if(e.getSource()==create)
              createAccount();
         else if(e.getSource()==newName)
              newPassword.requestFocus();
              newPassword.selectAll();
         else if(e.getSource()==newPassword)
              newPLevel.requestFocus();
              newPLevel.selectAll();
         else if(e.getSource()==newPLevel)
              createButton.doClick();
         else if(e.getSource()==createButton)
              if(newName.getText().equals("") || newPassword.getText().equals("") || newPLevel.getText().equals(""))
              createWindow.dispose();
              JOptionPane.showMessageDialog(window,"You have to enter an account name, a password and a plevel");
              else
              createProcess();
         else if(e.getSource()==remove)
              removeAccount();
    class LL implements ListSelectionListener
         public void valueChanged(ListSelectionEvent e)
         showValues();

  • Help with Note cards?? I thought I could do them with this program...

    Help! I purchased Adobe Photoshop Elements 12 back in September, but due to computer problems and working on other projects, I just got started using it. Or at least I'm trying to!
    My main (read: pretty well ONLY) reason for purchasing was that I thought I could make note cards (photo on front, folded, like a blank card, but with one of my photos on the front) for personal use and Christmas gift for my aunt who writes a lot of notes. I really wanted to create a special gift for her, as well as unique cards for my own use.
    But when I open the program and click "Create" all I see is Greeting Cards! And when I click on it, I don't see anything like what I want to create! Help! Is there any way to create this type of card with this program? Or at least close? I would really appreciate ANY and ALL help!!!
    Thanks!

    Hi,
    You can try going to finder, hitting CMD + F and below search this mac, you should see kind. You can try switching that contents and the second option to documents.
    Hope this helps,
    Zevie

  • My camera Canon G3 (i know it's old) no longer connects to iPhoto (8.1.2) on my iMac, I have checked with my friends iMac same model iPhoto version and it works fine using my cable, I would appreciate any help getting this sorted

    My camera Canon G3 (i know it's old) no longer connects to iPhoto (8.1.2) on my iMac, I have checked with my friends iMac same model iPhoto version and it works fine using my cable, I would appreciate any help getting this sorted

    As a Test:
    Hold down the option (or alt) key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?

  • Hello, so today I realized that my iPhone with iOS 6 is frozen on the music. I can get back to the home screen but I can't get the music player to work because its frozen on the w's and will not respond to touch. I would be grateful for any help on this.

    Hello, so today I realized that my iPhone with iOS 6 is frozen on the music. I can get back to the home screen but I can't get the music player to work because its frozen on the w's and will not respond to touch. I would be grateful for any help on this.

    Hi deamayfield,
    Thanks for visiting Apple Support Communities.
    If your Music app is unresponsive, try restarting/resetting your iPhone:
    iOS: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/ht1430
    Best,
    Jeremy

  • The bookmarks simply don't show in the sidebar. What is with this program, I thought it was supposed to be a good one. The bookmarks are totally unintuitive. How do you get any of your bookmarks to show?

    I thought this program was supposed to be so great. The bookmarks are totally unintuitive. I tried to import favorites from Explorer, can only see them if I bring down the menu from the top and select imported bookmarks. When I select Organize bookmarks, it is empty. No bookmarks show at all on the left. Does this sidebar actually work? Can you bring your imported bookmarks onto the sidebar? Can you organize it the way you want in the order you want to see them, as you can in Explorer? I am no big fan of Exploroer, which is why I am trying Firefox, but if bookmarks cannot be easily used, the program is worthless. Any herlp would be appreciated.

    Thanks - I had same problem with newly-imported Bookmarks from IE which didn't show in the sidebar. I have opened the Bookmarks Menu and all is OK.

  • HT3226 Having problems with my mouse. Cannot scroll up or down or sideways. Did all the cleaning but still not working. Any help on this??

    Having problems with my mouse. Cannot scroll up or down or sideways. Did all the cleaning but still not working. Any help on this??

    Hello:
    Try resetting the PRAM and SMC.
    Barry

  • Have mac mini with thunderbolt monitor 1yr old, recently updated with new 10.0.2 from apple, now iMovie doesn't seem to support my Sony HDR-XR500 camera. Is there any help on this?

    Have mac mini with thunderbolt monitor 1yr old, recently updated with new 10.0.2 from apple, now iMovie doesn't seem to support my Sony HDR-XR500 camera. Is there any help on this?

    haha, so now i'm thinking. I'm learning the terminal as fast as i can but there are several lines of codes and commands in there that throws up red flags to me that i don't fully understand. It just looks fishy too me. It would be highly appreciated if someone could just check this out just to tell me that i don't need to worry about it. Or point me in the right direction. I just feel un easy about this. ha.

  • I have problem with my I PHONE 4S  Always its time out then i must restart my I phone please any help about this case ??

    i have problem with my I PHONE 4S  Always its time out then i must restart my I phone please any help about this case ??

    Hello Pllumb,
    It sounds like you are unable to turn on Wi-Fi because the option is grayed out in Settings. Use these steps from the following article named:
    iOS: Wi-Fi settings grayed out or dim
    http://support.apple.com/kb/ts1559
    Restart your iOS device.
    Make sure that airplane mode is off by tapping Settings > Airplane Mode.
    Reset the network settings by tapping Settings > General > Reset > Reset Network Settings.
    This will reset all network settings, including Bluetooth pairing records, Wi-Fi passwords, VPN, and APN settings.
    Make sure that your device is using the latest software. To do so, connect your device to your computer and check for updates in iTunes.
    If you still can't turn Wi-Fi on, please contact Apple for support and service options. If you can turn Wi-Fi on but are experiencing other issues with Wi-Fi, please see these steps.
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • Hello. I recently updated numbers on my macbook pro. I like the auto completion feature (proposing te word as I type). With this new update, I cannot see this feature and it doesn't work automatically. Can I have any help on this issue ?

    Hello. I recently updated numbers on my macbook pro. I like the auto completion feature (proposing te word as I type). With this new update, I cannot see this feature and it doesn't work automatically. Can I have any help on this issue ?

    This is really unfortunate. I'm sorry that nothing works. I was going to mention holding down the power button and doing a force shutdown but you already did that. You might need to take it into the Apple store. I don't know if booting into safe mode would help. You would have to turn off the machine again, hit the start button and hold down the shift key after you hear the tone, but normally you would let go of the shift key when you see the apple logo and spining wheel. Maybe by holding down the shift key after you here the tone will cause the screen to come back on? The other option is to start up from the 'install disk' if your machine came with one. You would insert the disk, then shut down the computer, and hold down the C key right after hitting the start button.
    Here's the link for the safeboot
    http://support.apple.com/kb/HT1564?viewlocale=nl_nl

  • I am having trouble installing Itunes 11.1.1.  I get an error message 2502 and 2503.  Any help in this regard would be appreciated.

    I am having troble installing Itunes 11.1.1.  I get erro message 2502 and 2503.  Any help?

    Windows 7 32 bits
    I had the same issue which is now solved. For your information, the following procedure was successful:
    Check permissions within the Installer folder. To do this, follow these steps.
    1. Click on Start and in the Start Search bar > type in > c: /windows/installer.
    2. Right click on c: /windows/installer at the top under programs and click properties.
    3. Click on the security tab > Verify if System and Administrator account has Full access permissions.
    Note : I ran into problem with locating the C:\windows\installer directory. For some reason Windows Explorer wouldn't show it even though I don't have it hidden. I ended up using the ExplorerXP application to locate the directory. ExplorerXP is available at http://www.explorerxp.com/

  • Hi. ITunes 11 dont install my pc.. Problem: "There is a problem with this windows installer package. A problem required for this install to complete could not be run. Contact your support personnel or package vendor."  Please help me.

    Hi. ITunes 11 dont install my pc.. Problem: "There is a problem with this windows installer package. A problem required for this install to complete could not be run. Contact your support personnel or package vendor."  Please help me.

    Repair your Apple software Update.
    Go to START/ALL PROGRAMS/Apple Software Update. If it offers you a newer version of Apple Software Update, do it but Deselect any other software offered at the same time. Once done, try another iTunes install
    If you don't find ASU in All programs, go to control panel/
    XP- add n remove Programs/highlight ASU, CHANGE then REPAIR.
    Vista or Win7 - Programs n features/highlight ASU and click REPAIR

  • I ordered a new phone and shipped it to a friend in Dubai, UAE. without knowing i have to activate it by making 5minutes calls, please i need a way to activate it without sending it back to the US..any help? this has been very frustrating for me this past

    I ordered a new phone and shipped it to a friend in Dubai, UAE. without knowing i have to activate it by making 5minutes calls, please i need a way to activate it without sending it back to the US..any help? this has been very frustrating for me this past few days

    scottxx,
    That was very nice of you to provide your friend with a new phone! I am sorry to say that the device will not be able to activate while in Dubai. For a device to activate it must connect to the VZW network to become active. I apologize for any inconvenience.
    LindseyT_VZW

  • My iPad mini was working very fine from last 9 months....but suddenly today I found it discharging from 100% to 34% though I didn't use it at all...and also found my mini is slightly heated up at the bottom..any help regarding this would be greatful

    My iPad mini was working very fine from last 9 months....but suddenly today I found it discharging from 100% to 34% though I didn't use it at all...and also found my mini is slightly heated up at the bottom..any help regarding this would be greatful

    Same thing happened to me with my peruvian credit card in the peruvian app store, I want to buy an app, but it says that my credit card is "not supported in the Peruvian app store"

Maybe you are looking for