Results 1 to 5 of 5

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260

    Applet ot Swing Forma

    Java applet Swing .

    :
    Swing , TeacherBase.
    else if(button.equals(TeacherBase)) {
    new TeachersFrame().init();
    this.dispose();
    }
    :
    Exception in thread "Thread-3" java.lang.NullPointerException
    at java.applet.Applet.getAppletContext(Unkn own Source)
    Applet context .

  2. #2
    Registered User
    Join Date: Apr:2009
    Location:
    Posts: 243
    . . , .

  3. #3
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260
    , , .

    Code:
    @Override
    	public void actionPerformed(ActionEvent act) {
    		
    		JButton button = (JButton)act.getSource();
    		
    		if(button.equals(cancelButton)) {
    			//this.cancelButton.setBackground(Color.RED);
    			this.dispose();//Close the Window;
    			
    		}
    		else if(button.equals(chatButton)) {
    			new Login();
    			this.dispose();
    		}
    		else if(button.equals(TeacherBase)) {
    			new TeachersFrame().init();
    			this.dispose();
    		}
    		
    	}
    Code:
    public void init() 
    
    	{
    
    		datimeThread = new Thread(this);
    
    		datimeThread.start();
    
    		initGUI();
    
    		try
    
    		{
    
    			//List<Person> persons = (List<Person>)PersonManager.findByName("zsfdsd");
    
    			List<Teacher> customers = (List<Teacher>)TeacherManager.findByName("%");
    
    			((TeacherTableDataModel)personstable.getModel()).addCustomers(customers);
    
    		} catch(DataAccessException e)
    
    		{
    
    			JOptionPane.showMessageDialog(this, e.getMessage());
    
    		}
    
    	}

  4. #4
    Registered User
    Join Date: Apr:2009
    Location:
    Posts: 243
    , Exception-a. DataAccessException.
    NullPointer. , API java.lang.Exception, .
    Gobby. , Exception-a

  5. #5
    Registered User bombov's Avatar
    Join Date: Jan:2007
    Location:
    Posts: 260
    , , .
    Example.rar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |