Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Which swing components to use?

Reply
Thread Tools

Which swing components to use?

 
 
Javaman1003
Guest
Posts: n/a
 
      02-12-2004
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!
 
Reply With Quote
 
 
 
 
Andrew Hobbs
Guest
Posts: n/a
 
      02-12-2004

"Javaman1003" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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/tutor...ents/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/tutor...ing/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!



 
Reply With Quote
 
 
 
 
Adam
Guest
Posts: n/a
 
      02-12-2004

"Javaman1003" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swing Model Classes Updating Swing Components on a Thread Other Than AWT mkrause Java 0 05-06-2005 04:32 PM
SWING components adjustment in different resolutions - Should show scrollbars less than 800X600 and expand components over this resolution Bluetears76 Java 1 07-01-2004 09:01 PM
[Swing] how to relay events to other components T E Schmitz Java 3 04-21-2004 05:31 PM
Can Choice components respond to keyboard input like HTML Choice components? Mickey Segal Java 0 02-02-2004 10:59 PM
Import swing-components in J2ME-Applications Christian Marko Java 2 01-06-2004 05:40 PM



Advertisments