Which swing components to use?

Discussion in 'Java' started by Javaman1003, Feb 12, 2004.

  1. Javaman1003

    Javaman1003 Guest

    Hey all, I'm about to write a swing app and I'm trying to figure out
    which swing components to use. The main frame of the app will be a
    file reader essentially, which is uneditable. I want to be able to
    control mouse clicks and highlights on this frame (from mouse,
    keyboard etc.).

    I also want to have a menu which has some sort of options like Menu:
    Edit-> Options which will bring up another window that will allow me
    to set some options (will probalby have a checkbox and a text field).

    So I was going to use a JFrame with a TextPane for the first piece
    (file reader/displayer), but I'm not sure what to use for the menu
    dialog. I want to use a JFrame, but when I open one it adds another
    bar on the windows toolbar (but it's the same app, so I don't want
    that). Can I use an JInternalFrame for this? The only problem I see
    with JInternalFrame is that doesn't let the internal frames display if
    they're moved outside the border of the original window (desktoppane).

    Does anyone have any suggestions? Basically I just want to know the
    standard swing components for making a menu driven, multi-framed win32
    app.

    Thanks ahead of time!
     
    Javaman1003, Feb 12, 2004
    #1
    1. Advertising

  2. Javaman1003

    Andrew Hobbs Guest

    "Javaman1003" <> wrote in message
    news:...
    > Hey all, I'm about to write a swing app and I'm trying to figure out
    > which swing components to use. The main frame of the app will be a
    > file reader essentially, which is uneditable. I want to be able to
    > control mouse clicks and highlights on this frame (from mouse,
    > keyboard etc.).
    >
    > I also want to have a menu which has some sort of options like Menu:
    > Edit-> Options which will bring up another window that will allow me
    > to set some options (will probalby have a checkbox and a text field).
    >


    Why don't you use the inbuilt Menu system for Swing.

    See

    http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html

    > So I was going to use a JFrame with a TextPane for the first piece
    > (file reader/displayer), but I'm not sure what to use for the menu
    > dialog. I want to use a JFrame, but when I open one it adds another
    > bar on the windows toolbar (but it's the same app, so I don't want
    > that). Can I use an JInternalFrame for this? The only problem I see
    > with JInternalFrame is that doesn't let the internal frames display if
    > they're moved outside the border of the original window (desktoppane).
    >
    > Does anyone have any suggestions? Basically I just want to know the
    > standard swing components for making a menu driven, multi-framed win32
    > app.


    The overall tutorial is very useful.

    http://java.sun.com/docs/books/tutorial/uiswing/index.html

    Cheers

    Andrew


    --
    ********************************************************
    Andrew Hobbs PhD

    MetaSense Pty Ltd - www.metasense.com.au
    12 Ashover Grove
    Carine W.A.
    Australia 6020

    61 8 9246 2026
    metasens AntiSpam @iinet dot net dot au


    *********************************************************

    >
    > Thanks ahead of time!
     
    Andrew Hobbs, Feb 12, 2004
    #2
    1. Advertising

  3. Javaman1003

    Adam Guest

    "Javaman1003" <> wrote in message
    news:...
    > Hey all, I'm about to write a swing app and I'm trying to figure

    out
    > which swing components to use. The main frame of the app will be a
    > file reader essentially, which is uneditable. I want to be able to
    > control mouse clicks and highlights on this frame (from mouse,
    > keyboard etc.).
    >
    > I also want to have a menu which has some sort of options like

    Menu:
    > Edit-> Options which will bring up another window that will allow me
    > to set some options (will probalby have a checkbox and a text

    field).
    >
    > So I was going to use a JFrame with a TextPane for the first piece
    > (file reader/displayer), but I'm not sure what to use for the menu
    > dialog. I want to use a JFrame, but when I open one it adds another
    > bar on the windows toolbar (but it's the same app, so I don't want
    > that).


    The component you are looking for is JDialog.

    Adam
     
    Adam, Feb 12, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Julia
    Replies:
    1
    Views:
    331
    Bryant Hankins
    Aug 9, 2004
  2. Christian Marko
    Replies:
    2
    Views:
    3,906
    Tim Tyler
    Jan 6, 2004
  3. Mickey Segal
    Replies:
    0
    Views:
    897
    Mickey Segal
    Feb 2, 2004
  4. T E Schmitz
    Replies:
    3
    Views:
    419
  5. mkrause
    Replies:
    0
    Views:
    674
    mkrause
    May 6, 2005
Loading...

Share This Page