Problem mit AWT-FileDialog

derpilger

Grünschnabel
hallo!

Kann mir bitte jemand helfen und mir sagen warum der FileDialog nicht angezeigt wird - hab sonst immer mit Swing gearbeitet (FileChooser) aber wegen Performancegründen will ich das hier mit AWT lösen - hat da vielleicht jemand eine Idee?

Danke im Voraus für Eure Vorschläge!

GBY, all
derpilger

Code:
import java.awt.*;
 import java.awt.event.*;
 
 public class CheckDBProtokoll extends Frame{
 	
 	MenuBar mb;
 	Menu m;
 	MenuItem mi1;
 	MenuItem mi2;
 	MenuItem mi3;
 	
 	
 	/** Creates a new instance of CheckDB */
 	public CheckDBProtokoll(){
 		
 		mb=new MenuBar();
 		m=new Menu("Datei");
 		mi1=new MenuItem("Protokoll öffnen");
 		mi2=new MenuItem("Protokoll prüfen");
 		mi3=new MenuItem("Programm beenden");
 		m.add(mi1);
 		m.add(mi2);
 		m.addSeparator();
 		m.add(mi3);
 		mb.add(m);
 		
 		//Events
 		this.addWindowListener( new WindowAdapter() {  
 			public void windowClosing( WindowEvent e ) {  
 				System.exit(0);  
 			}  
 		});
 		
 		mi1.addActionListener(new ActionListener(){
 			public void actionPerformed(ActionEvent e){
 			    FileDialog fc = new FileDialog(CheckDBProtokoll.this,"Laden des Protokolls...",FileDialog.LOAD);
 				System.out.println("sers");
 			}
 		});
 		
 		mi3.addActionListener(new ActionListener(){
 			public void actionPerformed(ActionEvent e){
 				System.exit(0);
 			}
 		});
 		
 		
 		
 	   
 
 		this.setTitle("Check da DB Protokoll");
 		this.setMenuBar(mb);
 		
 		this.add(new Button(),BorderLayout.CENTER);
 		this.setLocation(300,300);
 		this.setSize(640,480);
 		
 		this.setVisible(true);
 	}
 	
 	public static void main(String [] args){
 		CheckDBProtokoll cdp = new CheckDBProtokoll();
 	}
 }
 
Zurück