Forum Stats

  • 3,851,951 Users
  • 2,264,054 Discussions
  • 7,904,915 Comments

Discussions

Applet not initialized. Where can I see stack trace?

843807
843807 Member Posts: 46,582
edited Oct 25, 2002 12:33AM in Java Applet Development
I am building an applet with 4 panels, some fields and buttons, etc. I got the panels looking exactly the way I want them, and now I'm trying to add the labels, textfields, etc. However, when I try to run it in my browser now, it wont init() and I have no clue why (yes, it compiles). Here is the code I added that seems to have broken it:
//***Set font for all labels***
		Font labelFont = new Font("Dialog", Font.PLAIN, 12);
		lUser.setFont(labelFont);
		lPass.setFont(labelFont);
		lProduct.setFont(labelFont);
		lSpecial.setFont(labelFont);
		lDate.setFont(labelFont);
		lTime.setFont(labelFont);
		lEvent.setFont(labelFont);
		lCost.setFont(labelFont);
		lMenuItem.setFont(labelFont);
		lExp.setFont(labelFont);
		
		//***Top Panel Components***
		lUser.setBounds(10, 30, 80, 20);
		pTop.add(lUser);
		tfUser.setBounds(100, 30, 120, 20);
		pTop.add(tfUser);
		lPass.setBounds(310, 30, 80, 20);
		pTop.add(pTop);
		tfPass.setBounds(400, 30, 120, 20);
		pTop.add(tfUser);
		bAddSpecials.setBounds(30, 80, 100, 38);
		pTop.add(bAddSpecials);
		bAddEvents.setBounds(330, 80, 100, 38);
		pTop.add(bAddEvents);
		bAddMenu.setBounds(500, 80, 100, 38);
		pTop.add(bAddMenu);
So where can I see a stack trace that might clue me in? Or does someone see where the problem lies? Thanks in advance!

Comments

  • 843807
    843807 Member Posts: 46,582
    Fast debug? Put some "System.out.println(varNames)" in strategic points and recompile. Execute the applet and open the Java console. If there was some faults this will display the error messages and the variable values.
This discussion has been closed.