Applet or application wont compile now?

I recently got a new computer at work. After I set everything up, including jre & sdk 1.4.1, and path file ifno on my windows xp box (same setup as the other machine), my same applications are now throwing errors?
It's as if for some reason my old setup was more lax on catching compile time errors.
Whats even weirder, is the old applets and applications compiled on my old machine still run fine and if I try to compile the old applets and applications without resaving them, I get no error, its just after I resave them, even if I only add a blank line to the file.
any suggestions
Jason

any suggestionsYes, tell us what the errors are exactly! And you should probably show relevant parts of the code too.

Similar Messages

  • When i updated my computer, my safari on applications wont open and says "safari quit unexpectedly" and wont open but when i open it on the application key on the mac, safari will open. how do i get safari back on my dock where it will open.

    When i updated my computer, my safari on applications wont open and says "safari quit unexpectedly" and wont open but when i open it on the application key on the mac, safari will open. how do i get safari back on my dock where it will open. when i click reopen it wont. but i know safari works because thats what im using right now. it just wont open when i click the one i had loaded on my dock and in applications. please help!
    Stephanie

    Drag the Safari icon straight up and off the Dock so it goes, "poof" ...
    Now click and hold the Safari app in the Applications folder and drag that to the Dock.
    See if you can open a webpage in Safari.

  • Querry regarding applets and application

    hello sir,
    i am in great trouble! please help me! see i want to know that is it possible that i can create an applet from application! in the sense i am studying in a computer institue and we are told to make a project on notepad! we are told to make a project through java! i have prepared it! but the question in my mind is that i have also created an applet which shows a clock with date and time! but the notepad i have created is an application and in that i have added menu bars in which there is a sub menu called "date/ time". i want that when ever some one clicks on date/ time tab then it should show the clock! i am confused! i cant get any thing as solution please help me! i am in great trouble! i want to submit my notepad by this thursday 2nd aug! please help me! i cant get anyone to help!
    i am also mailing my whole code! please rectify if any present!
    here is the code: for notepad
    import java.awt.*;
    import java.applet.*;
    import java.awt.font.*;
    import javax.swing.event.*;
    import javax.swing.colorchooser.*;
    import java.awt.print.*;
    import java.awt.event.*;
    import javax.swing.text.*;
    import javax.swing.undo.*;
    import java.io.*;
    import java.util.*;
    import javax.swing.*;
    public class Notepad implements KeyListener,ActionListener, ItemListener, Runnable
         static JFrame frame;
         static JTextArea txtArea;
         JScrollPane scrollPane;
         JMenuBar menuBar;
         JMenu fileMenu, editMenu, toolsMenu, aboutMenu;
         JMenuItem mNew, popNew, mDelete, mOpen, mSave, mSaveAs, mPrint, mClose, mExit, mCut, popCut, mCopy, popCopy, mPaste, popPaste,popSelectAll, mSelectAll, mDateTime, mAboutNotepad;
         JPanel panel;
         JPopupMenu popMenu;
         JCheckBoxMenuItem chkWordwrap;
         JComboBox cmbFontSize, cmbFont ;
         JToolBar toolbar;
         JButton btnSave, btnNew, btnOpen, btnCut, btnCopy, btnPaste;
         static boolean textChanged = false;
         static String title = " Notepad - by Vicky Saini";
         private static Vector fonts;
         static GraphicsEnvironment env;
         String fontChoice = "Font Choice";
         Integer FontSize ;
         Hashtable actions;
         DefaultStyledDocument document;
         Thread threadTime;
    // static AudioClip clockbeep;     
    public void help()
              JFrame frame= new JFrame();
              JOptionPane op = new JOptionPane(" Vicky Saini's NotePad 1.0, "
                                                                + "\n" + "Created by V I C K Y S A I N I \n"
                                                                + "Batch No: 1103 - SMA007 \n"
                                                                + "Developed under Guidence of Ashish Thakkar \n" + "\n" + "For support information Contact:\n"
                                                                +"[email protected] \n" + "\n"
    + " Copyright 2001-2005 SainiSoft\n"
                                                                     + "Download Version" + " \n"
                                                                     + "All Right Reserved \n" ,
    JOptionPane.INFORMATION_MESSAGE,JOptionPane.CLOSED_OPTION,new ImageIcon("vickyN.jpg"));
                   JDialog dialog = op.createDialog(frame,"About This Notepad");
                   dialog.setSize(450,350);
                   dialog.setResizable(false);
                   dialog.show();          
         public static void main(String args[])
              //clockbeep=getAudioClip(getDocumentBase(),"clockbell.au");     
              //clockbeep.play();
              JOptionPane.showMessageDialog(new JFrame(),"Wel-Come to Vicky's Notepad");
              Notepad notepad = new Notepad();
              notepad.createNotepad();
              txtArea.setRequestFocusEnabled(true);
              txtArea.requestFocus();
              //clockbeep.stop();
         public void createNotepad()
              frame = new JFrame(title);
              frame.setSize(600, 550);
              document = new DefaultStyledDocument();
              txtArea = new JTextArea(document);
              createActionTable(txtArea);
              txtArea.addKeyListener(this);
              scrollPane = new JScrollPane(txtArea);
              menuBar = new JMenuBar();
              frame.setJMenuBar(menuBar);
              createMenu(menuBar);
              panel = new JPanel();
              panel.setLayout(new BorderLayout());
              toolbar = new JToolBar();
              addButton(toolbar);
              panel.add(toolbar, BorderLayout.NORTH);
              frame.addWindowListener(new AppCloser());
              popMenu = new JPopupMenu();
              popMenu.setVisible(true);
              popMenu.setInvoker(scrollPane);
              addpopMenuItem(popMenu);
              MouseListener popupListener = new PopupListener();
              txtArea.addMouseListener(popupListener);
              scrollPane.addMouseListener(popupListener);
              threadTime = new Thread();
              threadTime.start();
              txtArea.setCursor(Cursor.getDefaultCursor());
              try
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch(Exception exc)
                   System.err.println("Error loading L&F: " + exc);
              panel.add(scrollPane, BorderLayout.CENTER);          
              frame.getContentPane().add(panel);
              frame.setVisible(true);     
         public String currentTime()
              Date currentDate = new Date();
              GregorianCalendar gc = new GregorianCalendar();
              gc.setTime(currentDate);
              String year = " " + gc.get(Calendar.YEAR);
              String month = year + "/" + gc.get(Calendar.MONTH);
              String day = month + "/" + gc.get(Calendar.DATE);
              String hour = day + " " + gc.get(Calendar.HOUR);
              String min = hour + ":" + gc.get(Calendar.MINUTE);
              String sec = min + ":" + gc.get(Calendar.SECOND);
              String milli = sec + "." + gc.get(Calendar.MILLISECOND);
              return milli;
         public void run()
              try
                   for(;;)
                        threadTime.sleep(1);
                        currentTime();
              catch(Exception e)
         public void addpopMenuItem(JPopupMenu popMenu)
              popNew = new JMenuItem(" New ");
              popMenu.add(popNew);
              popNew.addActionListener(this);
              popMenu.addSeparator();
              popCut = new JMenuItem(" Cut ");
              popMenu.add(popCut);
              popCut.addActionListener(this);
              popCopy = new JMenuItem(" Copy ");
              popMenu.add(popCopy);
              popCopy.addActionListener(this);
              popPaste = new JMenuItem(" Paste ");
              popMenu.add(popPaste);
              popPaste.addActionListener(this);
              popMenu.addSeparator();
              popSelectAll = new JMenuItem(" Select All ");
              popMenu.add(popSelectAll);
              popSelectAll.addActionListener(this);     
         public void createMenu(JMenuBar menuBar)
              fileMenu = new JMenu(" File ");
              fileMenu.setMnemonic('F');
              menuBar.add(fileMenu);
              editMenu = new JMenu(" Edit ");
              editMenu.setMnemonic('E');
              menuBar.add(editMenu);
              toolsMenu = new JMenu(" Tools ");
              toolsMenu.setMnemonic('T');
              menuBar.add(toolsMenu);
              aboutMenu = new JMenu(" About ");
              aboutMenu.setMnemonic('A');
              menuBar.add(aboutMenu);
              mNew = new JMenuItem(" New ");
              fileMenu.add(mNew);
              mNew.addActionListener(this);
              mNew.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.CTRL_MASK));
              mOpen = new JMenuItem(" Open ");
              fileMenu.add(mOpen);
              mOpen.addActionListener(this);
              mOpen.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK));
              mClose = new JMenuItem(" Close ");
              fileMenu.add(mClose);
              mClose.addActionListener(this);
              fileMenu.addSeparator();
              mSave = new JMenuItem(" Save ");
              fileMenu.add(mSave);
              mSave.addActionListener(this);
              mSave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyEvent.CTRL_MASK));
              mSaveAs = new JMenuItem(" SaveAs ");
              fileMenu.add(mSaveAs);
              mSaveAs.addActionListener(this);
              fileMenu.addSeparator();
              mPrint = new JMenuItem(" Print.... ");
              fileMenu.add(mPrint);
              mPrint.addActionListener(this);
              mPrint.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyEvent.CTRL_MASK));
              mExit = new JMenuItem(" Exit ");
              fileMenu.add(mExit);
              mExit.addActionListener(this);
              mExit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.ALT_MASK));
              editMenu.addSeparator();
              mCut = new JMenuItem(" Cut ");
              editMenu.add(mCut);
              mCut.addActionListener(this);
              mCut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.CTRL_MASK));
              mCopy = new JMenuItem(" Copy ");
              editMenu.add(mCopy);
              mCopy.addActionListener(this);
              mCopy.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_MASK));
              mPaste = new JMenuItem(" Paste ");
              editMenu.add(mPaste);
              mPaste.addActionListener(this);
              mPaste.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyEvent.CTRL_MASK));          
              mDelete = new JMenuItem(" Delete ");
              mDelete.addActionListener(this);
              editMenu.add(mDelete);
              editMenu.addSeparator();
              mSelectAll = new JMenuItem(" Select All ");
              editMenu.add(mSelectAll);
              mSelectAll.addActionListener(this);
              mSelectAll.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyEvent.CTRL_MASK));          
              toolsMenu.addSeparator();
              chkWordwrap = new JCheckBoxMenuItem(" WordWrap ");
              toolsMenu.add(chkWordwrap);
              chkWordwrap.addItemListener(this);
              toolsMenu.addSeparator();          
              mDateTime = new JMenuItem(" Date/Time ");
              toolsMenu.add(mDateTime);
              mDateTime.addActionListener(this);
              mDateTime.setAccelerator(KeyStroke.getKeyStroke("F5"));
              mAboutNotepad = new JMenuItem(" About Notepad ");
              aboutMenu.add(mAboutNotepad);
              mAboutNotepad.addActionListener(this);
         void addButton(JToolBar toolbar)
              btnOpen = new JButton(new ImageIcon("open.gif"));          
              btnOpen.setToolTipText("Open document");
              btnOpen.addActionListener(this);
              toolbar.add(btnOpen);
              btnOpen.setRequestFocusEnabled(false);
              btnOpen.transferFocus();
              btnNew = new JButton(new ImageIcon("new.gif"));     
              btnNew.setToolTipText("New Document ");
              btnNew.addActionListener(this);
              toolbar.add(btnNew);
              btnNew.setRequestFocusEnabled(false);
              btnNew.transferFocus();
              btnSave = new JButton(new ImageIcon("save.gif"));          
              btnSave.setToolTipText("Save document ");
              btnSave.addActionListener(this);
              toolbar.add(btnSave);
              btnSave.setRequestFocusEnabled(false);
              btnSave.transferFocus();
              toolbar.addSeparator();
              btnCut = new JButton(new ImageIcon("cut.gif"));          
              btnCut.setToolTipText("Cut selection");
              btnCut.addActionListener(this);
              toolbar.add(btnCut);
              btnCut.setRequestFocusEnabled(false);
              btnCut.transferFocus();
              btnCopy = new JButton(new ImageIcon("copy.gif"));          
              btnCopy.setToolTipText("Copy selection ");
              btnCopy.addActionListener(this);
              toolbar.add(btnCopy);
              btnCopy.setRequestFocusEnabled(false);
              btnCopy.transferFocus();
              btnPaste = new JButton(new ImageIcon("paste.gif"));
              btnPaste.setToolTipText("Paste selection ");
              toolbar.add(btnPaste);
              btnPaste.addActionListener(this);
              btnPaste.setRequestFocusEnabled(false);
              btnPaste.transferFocus();
              toolbar.addSeparator();
              env = GraphicsEnvironment.getLocalGraphicsEnvironment();
              String lsFonts[] = env.getAvailableFontFamilyNames();
              cmbFont = new JComboBox();
              cmbFont.setBackground(Color.white);
                   for (int i = 0; i < lsFonts.length; i++)
                        cmbFont.addItem(lsFonts);
              cmbFont.addItemListener(this);
              cmbFont.setMaximumRowCount(15);
              toolbar.add(cmbFont);
                   cmbFontSize = new JComboBox();
                   cmbFontSize.addItemListener(this);
                   cmbFontSize.setBackground(Color.white);
                   cmbFontSize.setRequestFocusEnabled(false);
                   for (int i = 8; i < 36; i+=2)
                             cmbFontSize.addItem(String.valueOf(i));
                             cmbFontSize.setSelectedItem("12");
              toolbar.add(cmbFontSize);
              toolbar.addSeparator();
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == mNew || e.getSource() == btnNew || e.getSource() == popNew)
                   if(textChanged)
                        int option = message();
                        if(option == 0)
                             new Save();
                             frame.setTitle(title);
                             txtArea.setText("");
                             txtArea.addKeyListener(this);
                             textChanged = false;
                        else if(option == 1)
                             frame.setTitle(title);
                             txtArea.setText("");
                             txtArea.addKeyListener(this);
                             textChanged = false;
                        else if(option == 2)
                             return;
                   else
                        frame.setTitle(title);
                        txtArea.setText("");
                        txtArea.addKeyListener(this);
                        textChanged = false;
              else if(e.getSource() == mOpen || e.getSource() == btnOpen)
                   if(textChanged)
                        int option = message();
                        if(option == 0)
                             new Save();
                             new Open();
                             txtArea.addKeyListener(this);
                             textChanged = false;
                        else if(option == 1)
                             new Open();
                             txtArea.addKeyListener(this);
                             textChanged = false;
                        else if(option == 2)
                             return;
                   else
                        new Open();
                        txtArea.addKeyListener(this);
                        textChanged = false;
              else if(e.getSource() == mSave || e.getSource() == btnSave)
                   new Save();
                   txtArea.addKeyListener(this);
                   textChanged = false;
              else if(e.getSource() == mSaveAs)
                   new SaveAs();
              else if(e.getSource() == mPrint)
                   PrinterJob printJob = PrinterJob.getPrinterJob();
                   PageFormat type = printJob.pageDialog(printJob.defaultPage());
                   Book bk = new Book();
                   printJob.setPageable(bk);
                   if(printJob.printDialog())
                        try
                             printJob.print();
              catch (Exception ex)
              else if(e.getSource() == mClose)
                   if(textChanged)
                        int option = message();
                        if(option == 0)
                             new Save();
                             frame.setTitle(title);
                             txtArea.setText("");
                             txtArea.addKeyListener(this);
                             textChanged = false;
                        else if(option == 1)
                             frame.setTitle(title);
                             txtArea.setText("");
                             txtArea.addKeyListener(this);
                             textChanged = false;               
                        else if(option == 2)
                             return;
                   else
                        frame.setTitle(title);
                        txtArea.setText("");
                        txtArea.addKeyListener(this);
                        textChanged = false;
              else if(e.getSource() == mExit )
                   if(textChanged)
                        int option = message();
                        if(option == 0)
                             new Save();
                             JOptionPane.showMessageDialog(new JFrame(),"OH!!!please dont leave me!");
                             System.exit(1);
                        else if(option == 1)
                             JOptionPane.showMessageDialog(new JFrame(),"OH!!!please dont leave me!");
                             System.exit(1);
                        else if(option == 2)
                             return;
                   else
                        JOptionPane.showMessageDialog(new JFrame(),"OH!!!please dont leave me!");
                        System.exit(1);
              else if(e.getSource() == mCut || e.getSource() == btnCut || e.getSource() == popCut)
                   txtArea.cut();
                   textChanged = true;
              else if(e.getSource() == mCopy || e.getSource() == btnCopy || e.getSource() == popCopy)
              {     txtArea.copy();}
              else if(e.getSource() == mPaste || e.getSource() == btnPaste || e.getSource() == popPaste)
                   txtArea.paste(); textChanged = true;
              else if(e.getSource() == mDelete)
                   txtArea.replaceSelection(null);     textChanged = true;
              else if(e.getSource() == mDateTime )
                   txtArea.insert(currentTime(), txtArea.getCaretPosition());
                   textChanged = true;
              else if(e.getSource() == mAboutNotepad)
                   help();
              public void itemStateChanged(ItemEvent ie)
              if(ie.getSource() == chkWordwrap)
                   if(chkWordwrap.getState())
                   {     txtArea.setLineWrap(true);     }
                   else
                   {     txtArea.setLineWrap(false);}
              else if(ie.getSource() == cmbFont)
                   fontChoice = (String)cmbFont.getSelectedItem();
              else if(ie.getSource() == cmbFontSize)
                   FontSize = new Integer((String)cmbFontSize.getSelectedItem());
              txtArea.setFont(new Font(fontChoice,Font.PLAIN, FontSize.intValue()));
              public void keyTyped(KeyEvent ke)
              textChanged = true;
              mSave.setEnabled(true);
              btnSave.setEnabled(true);
              mSaveAs.setEnabled(true);
              txtArea.removeKeyListener(this);
         public void keyPressed(KeyEvent ke)
         public void keyReleased(KeyEvent ke)
         public int print(Graphics g, PageFormat pf, int pi) throws PrinterException
              if (pi >= 1)
                   return Printable.NO_SUCH_PAGE;
              return Printable.PAGE_EXISTS;
         final static int message()
              JFrame frameMessage = new JFrame();
              Object message = "The text in the file has changed........Do u want to save the changes?";
              return JOptionPane.showConfirmDialog(frameMessage, message, " Save ", JOptionPane.YES_NO_CANCEL_OPTION);
         protected final class AppCloser extends WindowAdapter
              public void windowClosing(WindowEvent e)
                   if(textChanged)
                        int option = message();
                        if(option == 0)
                             new Save();
                             JOptionPane.showMessageDialog(new JFrame(),"OH!!!please dont leave me!");
                             System.exit(1);
                        else if(option == 1)
                             JOptionPane.showMessageDialog(new JFrame(),"OH!!!please dont leave me!");
                             System.exit(1);
                        else if(option == 2)
                             return;
                   else
                        JOptionPane.showMessageDialog(new JFrame(),"OH!!!please dont leave me!");
                        System.exit(1);
         class PopupListener extends MouseAdapter
              public void mousePressed(MouseEvent e)
              {     showPopup(e);     }
              public void mouseReleased(MouseEvent e)
              {          showPopup(e);     }
              private void showPopup(MouseEvent e)
                   if(e.isPopupTrigger())
                        popMenu.show(e.getComponent(), e.getX(), e.getY());
         private void createActionTable(JTextArea textArea)
              actions = new Hashtable();
              Action[] actionsArray = txtArea.getActions();
              for (int i = 0; i < actionsArray.length; i++)
                   Action a = actionsArray[i];
                   actions.put(a.getValue(Action.NAME), a);
         private Action getActionByName(String name)
    return(Action)(actions.get(name));
         class Open
              public Open()
                   JFrame frame;
                   FileDialog openFile;
                   frame = new JFrame();
                   frame.setLocation(150,150);
                   openFile = new FileDialog(frame, " Open ", 0);
                   openFile.show();
                   String dirName = openFile.getDirectory();
                   String fileName = openFile.getFile();
                   if(dirName == null || fileName == null)
                   {     return;     }
                   else
                        try
                             FileInputStream readFile = new FileInputStream(dirName + fileName);
                             int fileSize = readFile.available();
                             byte inBuff[] = new byte[fileSize];
                             int readByte = readFile.read(inBuff, 0, fileSize);
                             readFile.close();
                             Notepad.txtArea.setText(new String(inBuff));
                             Notepad.frame.setTitle(openFile.getFile());
                        catch(Exception e)
                             Object warn = "Unable to open";
                             JOptionPane.showMessageDialog(new JFrame(), warn, "Warning.....", JOptionPane.WARNING_MESSAGE );
         class Save
              JFrame frameSave;
              FileDialog saveFile;
              String fileName = frame.getTitle();
              public Save()
                   if(title == fileName)
                        frameSave = new JFrame();
                        frameSave.setLocation(150,150);
                        saveFile = new FileDialog(frameSave, " Save ", 1);
                        saveFile.show();
                        fileName = saveFile.getDirectory() + saveFile.getFile();
                        if(fileName.length() == 8)
                             return;
                        else
                             Notepad.frame.setTitle(saveFile.getFile());
                   try
                        FileOutputStream writeFile = new FileOutputStream(fileName);
                        System.out.flush();
                        String input = Notepad.txtArea.getText();
                        for (int n = 0; n < input.length(); n++ )
                             writeFile.write(input.charAt(n) );
                        writeFile.close();
                   catch (Exception e)
                        Object warn = "Unable to save file.........";
                        JOptionPane.showMessageDialog(new JFrame(), warn, "Warning.....", JOptionPane.WARNING_MESSAGE );
              btnSave.setEnabled(false); mSave.setEnabled(false); mSaveAs.setEnabled(false);
         class SaveAs
              public SaveAs()
                   JFrame frameSaveAs = new JFrame();
                   frameSaveAs.setLocation(150,150);
                   FileDialog saveFileAs = new FileDialog(frameSaveAs, " Save As ", 1);
                   saveFileAs.show();
                   String fileName = saveFileAs.getDirectory() + saveFileAs.getFile();
                   if(fileName.length() == 8)
                        return;
                   else
                        Notepad.frame.setTitle(saveFileAs.getFile());
                   try
                        FileOutputStream writeFile = new FileOutputStream(fileName);
                        System.out.flush();
                        String input = Notepad.txtArea.getText();
                        for (int n = 0; n < input.length(); n++ )
                             writeFile.write(input.charAt(n) );
                        writeFile.close();
                   catch (Exception e)
                        Object warn = "Unable to save file.........";
                        JOptionPane.showMessageDialog(new JFrame(), warn, "Warning.....", JOptionPane.WARNING_MESSAGE );
    here is the code for clock
    import java.awt.Graphics;
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.text.DateFormat;
    //<Applet code=ClockDemo5 Height=500 Width=600>
    //</Applet>
    //Clock with beep & buttons tried to enter alam settings into the applet itself
    //instead of using dialog but still unsucessful
    public class ClockDemo5 extends Applet implements ActionListener,Runnable {
         private Thread clock=null;
         Graphics g,g1;
         Image i1;
         int flag =0,fl=0;
         int beep=0;
         AudioClip clockbeep;
         String months[]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};
         String msg="";
         Button setalarm, stopalarm, help ,ok,cancel;
         Label hrlabel,minlabel;
         TextField hrtxt,mintxt;
         public void init(){
              try{
                   clockbeep=getAudioClip(getDocumentBase(),"clockbell.au");
                   showStatus("Created by : Yogesh Raje");
                   setalarm=new Button("Set Alarm");
                   stopalarm=new Button("Stop Alarm");
                   help=new Button("Help");
                   hrlabel=new Label("Enter Hour : ");
                   hrtxt=new TextField(2);
                   minlabel=new Label("Enter Minutes : ");
                   mintxt=new TextField(2);
                   ok=new Button("Ok");               
                   cancel=new Button("Cancel");
                   add(setalarm);
                   add(stopalarm);
                   add(help);
                   add(hrlabel);
                   add(hrtxt);
                   add(minlabel);
                   add(mintxt);
                   add(ok);
                   add(cancel);
                   hrlabel.setVisible(false);
                   hrtxt.setVisible(false);
                   minlabel.setVisible(false);
                   mintxt.setVisible(false);
                   ok.setVisible(false);
                   cancel.setVisible(false);
                   setalarm.addActionListener(this);
                   stopalarm.addActionListener(this);
                   help.addActionListener(this);
                   ok.addActionListener(this);
                   cancel.addActionListener(this);
              catch(Exception e){
                   showStatus("Unable To Load Audio Clip");
         public void start(){
              showStatus("Created by : Yogesh Raje");
              if(clock==null){
                   clock=new Thread(this,"clock");
                   clock.start();
         public void actionPerformed(ActionEvent ae){
              String str=ae.getActionCommand     ();
              flag=1;
    //          if(str.equals("Set Alarm")){
              if(ae.getSource()==setalarm){
                   hrlabel.setVisible(true);
                   hrtxt.setVisible(true);
                   minlabel.setVisible(true);
                   mintxt.setVisible(true);
                   ok.setVisible(true);
                   cancel.setVisible(true);
              else if(str.equals("Stop Alarm")){
              else if(str.equals("Help"))
                   msg="About help";
              mypaint();
         public void run(){
              showStatus("Created by : Yogesh Raje");
              Thread myclock=Thread.currentThread();
              g=getGraphics();
              i1=createImage(500,600);
              g1=i1.getGraphics();
              g1.setFont(new Font("Dialog",Font.BOLD,48));
              while(myclock==clock){
                   try{
                        beep--;
                        mypaint();
                        Thread.sleep(1000);
                   }catch(InterruptedException e){}
         public void mypaint(){
              Dimension d=getSize();
              Calendar cal=Calendar.getInstance();
              Date time=cal.getTime();
              DateFormat dateformat=DateFormat.getTimeInstance();
              int s=90+cal.get(Calendar.SECOND)*-6;
              int m=90+cal.get(Calendar.MINUTE)*-6;
              int h=90+cal.get(Calendar.HOUR)*-30+(int)(cal.get(Calendar.MINUTE)*-0.5);     
              //if(cal.get(Calendar.SECOND)==0 && cal.get(Calendar.MINUTE)==0){
                   fl=1;
                   beep=cal.get(Calendar.MINUTE);
              if(fl==1)
                   clockbeep.play();
              if(beep==1)
                   fl=0;
              //if(cal.get(Calendar.HOUR)==Integer.parseInt(cd.h1) && cal.get(Calendar.MINUTE)==Integer.parseInt(cd.m1))
                   //clockbeep.loop();
              showStatus("Created by : Yogesh Raje");          
              g1.setColor(Color.white);
              g1.fillRect(0,0,100,150);
              g1.setColor(Color.black);
              g1.drawString(beep+"",25,125);
              //g1.drawString(s1+"",25,35);
              g1.setColor(Color.black);
              g1.fillOval(d.width/2-200,d.height/2-200,400,400);
              g1.setColor(Color.orange);
              g1.fillOval(d.width/2-175,d.height/2-175,350,350);
              g1.setColor(Color.white);
              g1.setFont(new Font("Dialog",Font.BOLD,25));
              g1.fillRect(0,450,600,30);
              g1.setColor(Color.red);
              g1.drawString(dateformat.format(time),100,475);
              g1.drawString(""+months[cal.get(Calendar.MONTH)]+" "+cal.get(Calendar.DATE)+" "+cal.get(Calendar.YEAR),350,475);
              g1.setColor(Color.white);
              g1.setFont(new Font("Dialog",Font.BOLD,50));
              g1.drawString("12",267,125);
              g1.drawString("6",282,412);
              g1.drawString("9",132,270);
              g1.drawString("3",437,270);
              g1.setColor(Color.black);
              g1.fillArc(d.width/2-75,d.height/2-75,150,150,h,2);
              g1.setColor(Color.gray);
              g1.fillArc(d.width/2-100,d.height/2-100,200,200,m,2);
              g1.setColor(Color.green);
              g1.fillArc(d.width/2-125,d.height/2-125,250,250,s,1);
              g1.fillOval(d.width/2-5,d.height/2-5,10,10);
              g1.setFont(new Font("Dialog",Font.BOLD,18));
              g1.setColor(Color.black);
              if(flag==1){
                   flag=0;
                   g1.setColor(Color.white);
                   g1.fillRect(0,0,225,50);
              g1.drawString(msg,5,40);
              g.drawImage(i1,0,0,null);
         public void stop(){
              clock=null;
    please help me! i beg for ur help!!!!!!!!

    application->applet
    get rid of static variables. if nothing else helps put all your static variables in a class that does nothing but holding them and initialize only one such class and add a reference to it in every of your classes.
    whatever you have done in the main method do it now in the constructor of that class.
    from your applet (or if you have none make one that does nothing else) construct an instance of that class
    applet->application
    put all you have drawn directly on the applet ontpo some sort of window.
    change the init method to a constructor.
    make a class with a main method that constructs such an exapplet

  • Config application wont load after update!

    Hi everybody: I just update my z10 to the latest OS and now the configuration application wont start, well it actually does but shuts off inmediatly!
    I have tried restoring it, restarting it, let it off for a while, and nothing seems to work, restore to factory setting and reloaded the OS and nothing!!!
    HELP PLS!!!

    I fix it!! i hook it up to another laptop with Win 8 and the latest BBL, since they dont communicate to each other, the BBL always ask for a reload! so i did it and it got the latest OS and fix the thing!! everything is good now. Still my Z10 dont talk with win8 but it got it fixed. 
    The other PC i used was wtih latest BBL and Win7.

  • Arrays - confusing, wont compile, please help! ?:-)

    Hello everyone,
    I am new to the java forum, and I think its a fantastic idea. I am extremely stuck with my java, I have been workin on the same piece of code for at least 20 hours in total, 8 of which I spent in the last day, and to much of my frustration, the buggery code just wont compile. Im assuming many of you are probably laughing at me by now, lol, its ok, After my inital stress and hair pulling, all I could do was laugh. But I refuse to give up on the code after spending so long, and I have a feeling Im so close, its based around arrays, anyway I'll stop blabbering and post the code I have wrote, and if any of you could solve why it wont compile, it would be greatly appreciated.
    Heres my code:
    import avi.*;
    public class CDCollection
    private String title = "Unknown";
    private String artist = "Unknown";
    private int quan = 0;
    private double price = 0;
    CDCollection(double cdPrice, int cdQuan, String cdTitle, String cdArtist)
    title = cdTitle;
    artist = cdArtist;
    quan = cdQuan;
    price = cdPrice;
    return price;
    public static int findHighest(CDCollection[] cd) {
    int highestSoFar = -1; // lower than any valid
    for (int i = 0; i < cd.length; i++) {
    if (cd.CDCollection() > highestSoFar) {
    highestSoFar = cd[i].CDCollection();
    return highestSoFar;
    // instance method to write out cd details
    public void cdDetails(Window screen)
         screen.write("�"+price+"\t"+quan+"\t"+title+"\t"+artist+"\n");
    class CDMain
    public static void main(String[] args)
         Window screen = new Window ("CDMain", "bold", "black", 14);
    screen.showWindow();
         screen.write("CD List:\n\n");
              CDCollection cd1 = new CDCollection (10.99,11,"All Killer No Filler","Sum 41");
         cd1.cdDetails(screen);
    CDCollection cd2 = new CDCollection (12.99,8,"The best of","Sting");
         cd2.cdDetails(screen);
    Essentially wot Im tryin to do, is create a cd collection program, whereby details of the cd are entered (price, quantity, title and artist) and I would like to return statistical data on the cd collection, such as total number of cds, most expensive and cheapest cds etc. As you can I see I have tried to use arrays to find out the most expensive cd, but it still wont work! Please help, anyone, as Ive exhausted myself on this piece of code, Ive been through books, and I still cant bloody do it. :( lol
    Thanks in advance,
    All the best,
    Larry :-)

    Hi!
    First you never call your method findHighest.
    Second you do not have an array of your CD's. You only have two instances of it.
    Try this:
    CDCollection[] cds = new CDCollection[2];
    CDCollection cd[0] = new CDCollection (10.99,11,"All Killer No Filler","Sum 41");
    cds[0].cdDetails(screen);
    CDCollection cds[1] = new CDCollection (12.99,8,"The best of","Sting");
    cds[1].cdDetails(screen);
    int highest = CDCollection.findHighest(cds);
    And:
    public static int findHighest(CDCollection[] cd) {
    double highestSoFar = -1; // lower than any valid
    for (int i = 0; i < cd.length; i++) {
    if (cd.getPrice() > highestSoFar) {
    highestSoFar = cd[i].getPrice();
    return highestSoFar;
    And in your CDCollection class you need a method:
    public double getPrice()
    return this.price;
    I hope I did no mistake in here but it should work!
    Markus

  • My apple is not activating,Asking for Apple ID &p.word, I have entered the apple ID which i was using to download all apps,but it wont work, Now system is saying that your apple Id is wrong, My question is Can there be two apple IDs?

    My apple is not activating,Asking for Apple ID &p.word, I have entered the apple ID which i was using to download all apps,but it wont work, Now system is saying that your apple Id is wrong, My question is Can there be two apple IDs? My apple ID is my Yahoo mail it self, but not able to log in to  Icloud, Can any body guide, Why, I can not.

    Hi dip_kinu,
    I apologize, I'm a bit unclear on exactly what device you are trying to set up and what is happening when you try to do so. If you are having issues remembering your Apple ID, or feel like you may have set up multiple Apple ID's, you may find the following page helpful:
    Apple - My Apple ID: Find your Apple ID
    https://iforgot.apple.com/appleid
    Regards,
    - Brenden

  • To convert applet-based application?

    Hi
    There are some tools on market to run an applet-based application on server side. Those tools convert the behavior of applet application to Jsp application. So they run the application on web server and send HTML to web browser.
    One of those tools is WebCream(www.creamtec.com)
    Would appreciate to let me know other tools or any other ways to achive this.
    Thanks in Advance.

    repost

  • I wanted to update my itunes and it didn't update and now it wont open so i had to uninstall it and it wont install now at all can you please help?

    Hi
    I turned on my laptop this evening to import a new cd but it asked me if i wanted to download the new version of itunes so i went ahead to update it but it failed to update then it failed to open at all, and and runtime error keeps popping up but when i uninstalled it to reinstall it it wont install now and i cant use my ipod or ipad with my laptop without itunes and i never had this problem at all. can you please help?

    Hey maryncomiskey,
    Thanks for the question. I understand you are experiencing issues with the latest iTunes update. The following resource may help to resolve your issue:
    Issues installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/HT1926
    Additional Information:
    How to restart the Apple Mobile Device Service (AMDS) on Windows
    http://support.apple.com/kb/TS1567
    Thanks,
    Matt M.

  • HT1351 I have a apple ipod touch but recently I restored all the settings, as well as the applications. But now I am not able to add songs to it. There is blank screen that shows the symbol like to connect to itunes first. I'm not able to use that... Plea

    I have a apple ipod touch but recently I restored all the settings, as well as the applications. But now I am not able to add songs to it. There is blank screen that shows the symbol like to connect to itunes first. I'm not able to use that... Please help

    The iPod's firmware is corrupt. You'll need to restore it again in iTunes. If necessary, place the iPod in recovery mode for iTunes to recognize the device. Use the instructions in this Apple support document to walk you through the process of placing the iPod Touch into recovery mode.
    iOS: Unable to update or restore
    B-rock

  • Applications wont open

    All my purchased applications wont open any more. I recently changed from a laptop using vista to a new macbook and my applications wont sync from phone to itunes on mac.
    I can still open all apps that came with phone i am on ver 2.2 software help please I really need to get into my calender and cant go another day without vegas pool.
    Robert

    It just says check with the developer to make sure Mail works with this version of OS X. you may need to reinstall the application. Be sure to install any updates for the app and OS X.
    This just started happening last night

  • My iCloud application wont open...

    Please help - My iCloud application wont open on my OS X 10.9.3 so I can't download updates to fix the After Effects compatibility issue...?

    Link for Download & Install & Setup & Activation problems may help
    -Chat http://www.adobe.com/support/download-install/supportinfo/
    OR
    Some download & install troubleshooting links
    -Comodo Security kills download http://forums.adobe.com/thread/1460361?tstart=0
    -http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html
    -http://helpx.adobe.com/creative-cloud/kb/error-downloading-cc-apps.html
    -http://forums.adobe.com/community/download_install_setup
    -http://helpx.adobe.com/creative-cloud/kb/troubleshoot-cc-installation-download.html
    -http://helpx.adobe.com/x-productkb/global/errors-or-unexpected-behavior-websites.html
    -http://helpx.adobe.com/creative-cloud/kb/unknown-server-error-launching-cc.html
    -Server won't connect https://forums.adobe.com/thread/1233088
    -AND JUST FOR MAC USERS - Some 10.9.3 links
    -Mac 10.9.3 workaround https://forums.adobe.com/thread/1489922
    -more Mac 10.9.3 https://forums.adobe.com/thread/1491469
    -Enable Mac Root User https://forums.adobe.com/thread/1156604
    -more Root User http://forums.adobe.com/thread/879931
    -and more root user http://forums.adobe.com/thread/940869?tstart=0

  • I have an Imac that is a year and a half old and the front of it just fell off  and it wont work now. Has this ever happened to  anyone?

    I have an Imac that is a year and a half old and the front of it just fell off  and it wont work now. Has this ever happened to  anyone?

    If you have Apple care and the problem occured without misuse on your part ... it can be replaced without charge.

  • ITunes and Genius, purchased music wont play now

    after installing iTunes Genius, my purchased music wont play now. it gets skipped over in normal play mode. the box next to selection has the "check". album artwork still shows up when song is highlighted.

    Check these out:
    Songs That Skip On iPod
    iPod Does Not Play Content from iTunes Music Store
    I hope this helps!

  • A movie i rented on itunes wont download now what do i do?

    a movie i rented from itunes wont download now what do i do?

    Hey Patiencepieart!
    While there is not enough information in the post about your circumstance to be able to say for sure, but here are some tips from the iTunes movie rental FAQ that may be helpful to you:
    iTunes Store: Movie rental frequently asked questions (FAQ)
    http://support.apple.com/kb/ht1657
    Where can I watch my movie rental?
    You can watch your movie rental on your computer, iPhone, iPad, iPod touch (with iOS 3.1.3 or later), iPod classic, iPod nano (3rd, 4th, or 5th generation), or on your TV using your Apple TV. You can watch HD movie rentals on your computer, iPhone 4 or later, iPad, iPod touch (4th generation or later), or with Apple TV.
    How many times can I view the movie?
    Once you start watching your movie, you can view the rented movie as many times as you wish within the 24-hour (or 48-hour) window.
    What happens to my rented movie if I don't watch it?
    If you don't watch your rented movie, it will expire in 30 days and disappear from your iTunes library. You will need to rent it again in order to watch it.
    Can I play my rental on more than one device?
    If you download a rented movie on your computer: You can transfer it to a device such as your Apple TV (1st generation), iPhone, iPad, or iPod if it’s a standard-definition film (movies in HD can only be watched on your computer, iPad, iPhone 4 or later, iPod touch (4th generation or later), or Apple TV). Once you move the movie from your computer to a device, the movie will disappear from your computer's iTunes library. You can move the movie between devices as many times as you wish during the rental period, but the movie can only exist on one device at a time.
    If you download a rented movie on your iPhone 4 or later, iPad, iPod touch (4th generation or later), or Apple TV: It is not transferable to any other device or computer.
    Take care, and thanks for visiting the Apple Support Communities.
    Cheers,
    Braden

  • Run applet as application

    Hi To All,
    I'm converting a Applet into Application.
    All the things are runing well but when my Applet gets to try the access getDocumentBase() method
    its giving a nullPointerException
    My all code is written below please help me to find out the problem
    import java.awt.Frame;
    import java.awt.event.*;
    import java.awt.Dimension;
    import java.applet.Applet;
    // Applet to Application Frame window
    public class AppletFrame extends Frame implements java.awt.event.WindowListener
    public static void startApplet(String className, String title,String args[])
    { Dimension appletSize;
    try
    // create an instance of your applet class
    myApplet = (Applet) Class.forName(className).newInstance();
    catch (ClassNotFoundException e)
    { System.out.println("AppletFrame " + e);
    return;
    catch (InstantiationException e)
    System.out.println("AppletFrame " + e);
    return;
    } catch (IllegalAccessException e)
    System.out.println("AppletFrame " + e);
    return;
    } // initialize the applet myApplet.init();
    myApplet.start();
    AppletFrame f = new AppletFrame(title);
    f.add("Center", myApplet);
    f.addWindowListener(f);
    appletSize = myApplet.getSize();
    f.pack();
    f.setSize(appletSize);
    f.show();
    public AppletFrame(String name)
    { super(name);
    } public void windowClosing(java.awt.event.WindowEvent ev)
    { myApplet.stop();
    myApplet.destroy();
    java.lang.System.exit(0);
    } public void windowClosed(java.awt.event.WindowEvent ev) {}
    public void windowActivated(java.awt.event.WindowEvent ev) {}
    public void windowDeactivated(java.awt.event.WindowEvent ev) {}
    public void windowOpened(java.awt.event.WindowEvent ev) {}
    public void windowIconified(java.awt.event.WindowEvent ev) {}
    public void windowDeiconified(java.awt.event.WindowEvent ev) {}
    private static Applet myApplet;
    public static void main(String args[]){
    startApplet("appletImageBook.appletImage.Standalone2","XApplets",args);
    ====================================================
    And Standalone2.java is
    public class Standalone2 extends Applet {
    Image img ;
    public void init()
    { add(new Button("Standalone Applet Button"));
    img = getImage(getDocumentBase(),"images/office1.jpg");
    public void paint(Graphics g) {
    g.drawImage(img,0,0,null);
    =====================================================
    And while runing AppletFrame.java it is giving Error below
    ===============================
    Exception in thread "main" java.lang.NullPointerException at java.applet.Applet.getDocumentBase(Applet.java:125)
    at appletImageBook.appletImage.Standalone2.init(Standalone2.java:20) at appletImageBook.appletImage.AppletFrame.startApplet(AppletFrame.java: 38)
    at appletImageBook.appletImage.AppletFrame.main(AppletFrame.java:99)
    ===============================
    Any type of help will be fine for me
    Thanks in advance

    The only difference between an applet and an application should be the way they are started.
    Instead of adding an applet to a frame, open a frame from the applet. Open the same frame from your application.
    Or instead of a frame, use a (J)Panel. Add it directly to your applet, or add it to a new frame when you want to run it as an application.
    In any case: separate the way the UI is created from the way the application is started.

Maybe you are looking for