Why the dialog dosent come up ?

I have 2 files j003Dialog.java and j003.java
in j003 java which is an applet, I try to pop up an dialog, but it doent work, anyone can fine the error ?
it compiles.. but nothing more happends..
here is j003.java
package j001;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
public class j003 extends Applet {
  private boolean isStandalone = false;
  Button open = new Button();
  Button close = new Button();
  j003Dialog yon;
  //Get a parameter value
  public String getParameter(String key, String def) {
    return isStandalone ? System.getProperty(key, def) :
      (getParameter(key) != null ? getParameter(key) : def);
  //Construct the applet
  public j003() {
  //Initialize the applet
  public void init() {
    try {
      jbInit();
    catch(Exception e) {
      e.printStackTrace();
  //Component initialization
  private void jbInit() throws Exception {
    open.setActionCommand("�ppna");
    open.setLabel("�ppna");
    open.addActionListener(new j003_open_actionAdapter(this));
    close.setLabel("St�ng");
    close.addActionListener(new j003_close_actionAdapter(this));
    this.add(open,null);
    this.add(close, null);
    yon = new j003Dialog(new Frame(),"testar bara",true);
    yon.setSize(300,300);
  //Get Applet information
  public String getAppletInfo() {
    return "Applet Information";
  //Get parameter info
  public String[][] getParameterInfo() {
    return null;
  void close_actionPerformed(ActionEvent e) {
    yon.hide();
  void open_actionPerformed(ActionEvent e) {
    yon.show();
class j003_close_actionAdapter implements java.awt.event.ActionListener {
  j003 adaptee;
  j003_close_actionAdapter(j003 adaptee) {
    this.adaptee = adaptee;
  public void actionPerformed(ActionEvent e) {
    adaptee.close_actionPerformed(e);
class j003_open_actionAdapter implements java.awt.event.ActionListener {
  j003 adaptee;
  j003_open_actionAdapter(j003 adaptee) {
    this.adaptee = adaptee;
  public void actionPerformed(ActionEvent e) {
    adaptee.open_actionPerformed(e);
}and here is j003Dialog.java
package j001;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import com.borland.jbcl.layout.*;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2006</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
public class j003Dialog extends JDialog {
  JPanel panel1 = new JPanel();
  XYLayout xYLayout1 = new XYLayout();
  JFormattedTextField jFormattedTextField1 = new JFormattedTextField();
  JFormattedTextField jFormattedTextField2 = new JFormattedTextField();
  JButton btn_cancel = new JButton();
  JButton btn_ok = new JButton();
  public j003Dialog(Frame frame, String title, boolean modal) {
    super(frame, title, modal);
    try {
      jbInit();
      pack();
    catch(Exception ex) {
      ex.printStackTrace();
  public j003Dialog() {
    this(null, "", false);
  private void jbInit() throws Exception {
    panel1.setBounds(new Rectangle(10, 10, 256, 88));
    this.getContentPane().setLayout(null);
    panel1.setLayout(xYLayout1);
    jFormattedTextField1.setText("jFormattedTextField1");
    jFormattedTextField2.setText("jFormattedTextField2");
    btn_cancel.setFont(new java.awt.Font("Dialog", 0, 11));
    btn_cancel.setDebugGraphicsOptions(0);
    btn_cancel.setDoubleBuffered(false);
    btn_cancel.setActionCommand("cancel");
    btn_cancel.setText("Avbryt");
    btn_cancel.addActionListener(new j003Dialog_btn_cancel_actionAdapter(this));
    btn_ok.setActionCommand("ok");
    btn_ok.setText("ok");
    btn_ok.addActionListener(new j003Dialog_btn_ok_actionAdapter(this));
    panel1.add(jFormattedTextField1, new XYConstraints(3, 6, 107, 31));
    panel1.add(jFormattedTextField2, new XYConstraints(122, 8, 114, 31));
    panel1.add(btn_cancel, new XYConstraints(18, 47, 79, 26));
    panel1.add(btn_ok, new XYConstraints(131, 48, 85, 24));
    this.getContentPane().add(panel1, null);
  void btn_ok_actionPerformed(ActionEvent e) {
    this.hide();
  void btn_cancel_actionPerformed(ActionEvent e) {
    this.hide();
   * j003Dialog
   * @param j003 j003
   * @param string String
   * @param b boolean
  public j003Dialog(j003 j003, String string, boolean b) {
class j003Dialog_btn_ok_actionAdapter implements java.awt.event.ActionListener {
  j003Dialog adaptee;
  j003Dialog_btn_ok_actionAdapter(j003Dialog adaptee) {
    this.adaptee = adaptee;
  public void actionPerformed(ActionEvent e) {
    adaptee.btn_ok_actionPerformed(e);
class j003Dialog_btn_cancel_actionAdapter implements java.awt.event.ActionListener {
  j003Dialog adaptee;
  j003Dialog_btn_cancel_actionAdapter(j003Dialog adaptee) {
    this.adaptee = adaptee;
  public void actionPerformed(ActionEvent e) {
    adaptee.btn_cancel_actionPerformed(e);
}

@Op.
Just a sidenote. Please write your code and comments in English when you post code. Do also use better classnames. Looking at Swedish comments and strings is just like looking at obfuscated code for most forum users.
Kaj

Similar Messages

  • HT5132 I have tried this at least a dozen times and nothing happens....the dialog box comes up but no signs of downloading occurs even after 3 hours!!

    I have tried this at least a dozen times and nothing happens....the dialog box comes up but no signs of downloading occurs even after 3 hours!!

    Try to download your MobileMe galleries directly from the Internet:
    Go to the System/MobileMe preference pane
    Press the button,Visit me.com,
    this will bring you to your MMe galleries and you can download the photos from there.
    Usually this direct way will be faster.
    To be able to use Aperture again, don't press the ok. button, when the MM panel appears, but the "learn more". then you can open the "File" menu in Aperture and use the "Web Accounts" menu entry to "Edit Web accounts" and  disable MobileMe in Aperture by deleting it from the accounts list.
    Regards
    Léonie

  • HT1212 i broke my old iphone . The screen dosent come on to unlock it .I have pictures and ringtones i want to recoverand install on my new i phone. What do i do?

    i broke my old iphone.. The screen will not turn no to unlock it ..i have photos and ringtones i want to recover..
    how do i get the back and sinc on me new iphone??

    Was nothing backed up on iTunes or iCloud before the accident? It is best to back up before something happens.
    George

  • HT201363 Hi, im am traing to get my questions reset because i forgot them but i lock my ID so I email to reset but the emails dosent come or sent i have been trying since yesterday please i need help so i can use my appstore card

    Hello?

    Reset Security Questions
    http://support.apple.com/kb/HT5312
    If you can't solve problem, call Apple to help reset your Security Question.
    http://support.apple.com/kb/HT5699

  • Print dialog box comes up after 30 sec delay-why?

    Hi,
    I am in Ai CS4. The first file I open, when I go to print it takes just over 30 secs for the print dialog box to come up. The next time I print, no problem, pops up right away. All subsequent file print dialog boxes come up immediately. Quit Illustrator and it starts all over again. Rebuilt permissions, then rebuilt from startup disk, trashed preferences. Tried changing default printer. Nothing seems to solve this. Mac Quad-Core Intel Xeon, OSX 10.6.3
    Any ideas out there?
    Thanks
    Marcia

    Thanks, I'll give that a try. Appreciate your assistance!
    Marcia
    Marcia T Sinner
    Creative Director
    Zoological Society of Milwaukee
    10005 W. Blue Mound Rd.
    Milwaukee, WI  53226
    414.258.5020 x514
    fax 414.258.2795
    [email protected]
    Pray for Peace.
    From: Zach Zurn <[email protected]>
    Reply-To: <[email protected]>
    Date: Thu, 08 Apr 2010 12:35:46 -0600
    To: Marcia Sinner <[email protected]>
    Subject: Print dialog box comes up after 30 sec delay-why?
    I know you are on a Mac, but on windows a similar problem and even a crash can
    occur when your default printer spooling service is set to manual instead of
    auto.
    Either set your default printer to a virtual printer like "Adobe PDF" or go
    into the printer settings and set spooling to automatic.
    >

  • If Apple is so full of geniuses, why can't they come up with a usb cable to connect the iPad to a printer? This would seem like the most intelligent first choice for those of us who are absolutely frustrated with iPad printing functionality.

    My sister has an iPad and an HP printer. She cant' print from her iPad even though a genius at the Apple Store sold the combination to her with the idea that it would be easy to do. Instead, I have to go to her place with my MacBook, she sends me an email, and I hook up my laptop to her printer to print what she needs. Why can't the Apple geniuses come up with a USB cable and an OS update to make it easy and NOT SO FRUSTRATING to print from the iPad?
    I've been a Mac user for fifteen years but I could not, in good conscience, recommend an iPad to anyone until Apple considers that ease of use does not include regularly getting frustrated with the easiest of tasks.

    all printers speak a diffrent "computer language" for a device to understand this language
    a driver is required
    some devices such a computers come with drivers for a long line of printers and other devices
    apple decided that it was better not to include that huge list of drivers as users would then not have
    much storage left for media and apps
    then apple let printer makers make apps for printing in app store and make printers support airprint

  • HT3275 Hi, I have backed up 2 IMACs and one Mac Book Pro but for some reason, the 3rd IMAC come up with this problem: The backup disk image "/Volumes/Data/Anthony's iMac.sparsebundle" could not be accessed (error -1). Why? They computer system is up to da

    Hi, I have backed up 2 IMACs and one Mac Book Pro but for some reason, the 3rd IMAC come up with this problem: The backup disk image “/Volumes/Data/Anthony’s iMac.sparsebundle” could not be accessed (error -1). Why? The computer system is up to date and I have had no issue with the other computers, just this one.
    Many thanks
    Anthony

    Try this Discussion...
    https://discussions.apple.com/message/18783684#18783684

  • Why does the apple icon come on then off then a white screen appears?

    Why does the apple icon come on then off then a white screen appears? 

    Try:
    - iOS: Not responding or does not turn on
    - If not successful and you can't fully turn the iPod fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • Why does my screen come up dark when I press the camera icon?

    Why does my screen come up dark when I press the Camera icon?  I can neither take pictures nor look at the photos I have saved.

    Doulbe tab the home key to see the task bar.  Touch and hold any of those icons until they jiggle, then delete them by touching the minus sign.   Then reboot the pad by holding the sleep and home buttons until the apple logo appears.  Ignore the red slider.
    You either have another app open that is using the camera, or you just have too much stuff in memory.  The reset process should clear it up.

  • Why do my pictures come out pink when I take a picture with the flash

    Why do my pictures come out pink when I take a picture with the flash

    If you got a cover for your iPhone then take it off. The flash reflect on the cover because the hole is too small

  • When i try to load pictures or to veiw them in another window, e.g. from ebay, or any site, the page will come up blank. why is this?

    when i try to load pictures or to view them in another window, e.g. from ebay, or any site, the page will come up blank. why is this?

    Some mail programs, including Apple Mail, can reduce the size of images that are attached to a message. It's happening at the sender's end, and all you can do is ask the sender for a larger image.

  • Why photoshop cs6 show my epson scanner in the dialog box. photoshop 7 did show it.

    my cs6 does not show my epson scanner in the dialog box as photoshop 7 deid.

    What operating system?
    You might need to install the optional twain plugin for photoshop cs6:
    http://helpx.adobe.com/photoshop/kb/twain-plug-photoshop-cs4-cs5.html
    (covers cs6 as well)

  • When I charge my ipod, the apple symbol comes up as if it was turning on, then it goes black and repeats the process. Sometimes it gets to where I have to put in my 4 digit code to unlock it then goes black, any suggestions on why it does this?

    When I charge my ipod, the apple symbol comes up as if it was turning on, then it goes black and repeats the process. Sometimes it gets to where I have to put in my 4 digit code to unlock it then goes black, any suggestions on why it does this?

    Does it work OK otherwise?
    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Try another cable and USB port and/or charging source
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                                      

  • Why does the EEvents message come up every time the computer is opened after being shut off?

    Why does the EEvents message come up every time the computer is opened after being shut off?

    You need to check the software you run.
    Some officially supported and sold Mac versions of software use Wine for porting in some fashion or another.  If some program you are running is spawning these Wine processes, its probably buggy and not shutting down correctly.
    How to figure out which are Wine and which are not...?
    Well if its a Cider ported game, you just see if there is a Cider logo on the game.
    If its Wineskin ported, theres no super easy way to tell, depending on how much its been modified, but you can look inside the app (right click and "Show Package Contents") and go to Contents/MacOS and see if Wineskin executable is in there.  Unless its a very old version of Wineskin it shouldn't be able to hang like that without major issues int he Windows software running in it, and I don't know any any company would release it if it was that buggy.
    If its WineBottler Ported, you'll notice quickly because it launches X11 and runs the windows under X11... of course not all X11 apps are Wine, but if you have a program that launches and runs in X11.app then you can look inside it at Contents/MacOS to see if its Wine related.
    It could also be Crossover, or a Crossover port of software... you'd have to dig around inside of its app too to see if it looked like one of those.

  • Why my map dosent show the addresses completly? it just shows the name of the city or in the best way the name of expressway (no matter how much i zoom in)and it wont work in reminder or any other place. this happend after i update my iphone 4 to ios 5.

    why my map dosent show the addresses completly? it just shows the name of city or in the best way the name of exxpressway and it wont work in reminder or any other place. this happend after i update my iphone 4 to ios 5.

    I am having a really wierd issue as well that is probally related. I dont see 95% of the album artwork associated with my music. Also, it seems as if this has gotten worse since I started using that match feature

Maybe you are looking for

  • How do you limit TOC navigation for multiple users on one computer?

    If you have 5 Adobe Captivate 5.5. Projects linked together to play consecutively how can you set up a TOC so that each new user starts from the beginning  and can only go back to slides that the new user has viewed?  We have  the TOC set to Enable N

  • Help! The screen on my iPod Touch is stuck on white!

    Well I was having problems with the volume control, and then the whole thing just crashed. It still strangely plays music, but the screen is white. What do I do?

  • Internet Connection thru USB /N95 8GB

    I have just got the N95 8GB and loaded the software etc. It will not connect to the internet, error msg says no modem detected. I had a similar problem with the previous N95 in the months leading up to my upgrade. After using it to connect to the net

  • How do I get the details of runtime errors to display in errorPage.jsp???

    how do I get the details of a JSP runtime error onto my errorPage.jsp? Currently, I'm getting a NumberFormatException - but I can see no details. I have to assume that I do not have the errorPage.jsp set up correctly to capture the details of an exce

  • End of List

    Hi How can i print after end of list in alv. I have a list with columns like empcode(100),name(abc),gender(male),share(1) empcode(101),name(bcd),gender(male),share(1) empcode(102),name(eef),gender(female),share(1) empcode(102),name(ghi),gender(female