2

I am using java.awt.FileDialog to LOAD a file into my application.

By default, the options that are available while opening the file are "CANCEL" and "OPEN".

I want to add another button so that three options are shown in the FileDialog - "CANCEL", "OPEN", and "OPEN AND DO X".

How can I do this? This doesn't seem to be straightforward.

Moeb
  • 10,527
  • 31
  • 84
  • 110
  • Why AWT rather than Swing? See this answer on [Swing extras over AWT](http://stackoverflow.com/a/6255978/418556) for many good reasons to abandon using AWT components. If you need to support older AWT based APIs, see [Mixing Heavyweight and Lightweight Components](http://www.oracle.com/technetwork/articles/java/mixing-components-433992.html). – Andrew Thompson Sep 02 '13 at 03:53
  • @AndrewThompson: Just to be able to use native OS UI elements. – Moeb Sep 02 '13 at 03:55
  • 2
    I agree that Swing is the way to go over AWT, the link @AndrewThompson provided is a very good explanation of why. Can you give more details on what native OS UI elements you are trying to use? There may be a simple way to do it in Swing, and you can easily add buttons to a dialog in Swing as well – hotforfeature Sep 02 '13 at 04:42

0 Answers0