Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2003

Tip: Looking for answers? Try searching our database.

swing

Thread view: 
SPETZNAZ - 23 Nov 2003 01:25 GMT
I just started with Java so forgive my asking questions that may have
been answered... I did look via google.

First, I have the main working parts of a java app. Everything works
fine but now I want a nice looking GUI to go with it.

The docs I have been looking at dont give too many examples and I hate
to say it but that is the best way I learn. I gota see the code...

Does anyone know of a site that shows the basic layout for a form that
calls on methods in another class?

Something with 3 or more text fields with a submit button....

Any ideas where I can find this?
Andrew Thompson - 23 Nov 2003 01:35 GMT
...
> First, I have the main working parts of a java app. Everything works
> fine but now I want a nice looking GUI to go with it.
...
> Does anyone know of a site that shows the basic layout for a form that
> calls on methods in another class?
>
> Something with 3 or more text fields with a submit button....

Possibly a GridLayout..
http://java.sun.com/docs/books/tutorial/uiswing/layout/grid.html
inside a..
http://java.sun.com/docs/books/tutorial/uiswing/layout/border.html

Which brings me to, ..start here..
http://java.sun.com/docs/books/tutorial/uiswing/index.html

HTH

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
SPETZNAZ - 23 Nov 2003 04:58 GMT
> ...
>
[quoted text clipped - 23 lines]
> * http://www.1point1C.org/ 1.1C - Superluminal!
> * http://www.AThompson.info/andrew/ personal site

I have been over them in the past but I was looking for another site....
Something with more examples to look at. Keep in mind.. I am just in the
second week of learning java. So far, swing is kicking my rear end.  :-/

I will go back over them but to help, I will explain a little more of
what end result I am looking for.

I have a class that has about 15 methods in it. I will only need about 5
of them for the GUI side of things.

getUsername and setUsername are 2 of them. (There are more... but this
is a good start)

What I would love it several text fields that display what the value is
of these methods. (setUsername will replace the name in a text file...
getUsername reads what it is set to now)

So when I first run the GUI app, have it display the current value and
be able to replace the text in the JTextField with new data. When I hit
the submit button, have it pass the data in the JTextFields to the right
methods so they can do their job.

Then, I will be able to grow my hair back and in time... the dog will
not run when I walk in the room.

Thanks for your time!
Andrew Thompson - 23 Nov 2003 05:17 GMT
...
> I have been over them in the past but I was looking for another site....
> Something with more examples to look at. Keep in mind.. I am just in the
> second week of learning java.

'the second week of learning java' seems way too soon
to be launching into Swing apps. (or GUI apps for that
matter) but I suppose it is your choice..

> So far, swing is kicking my rear end.  :-/

I am not surprised, given the stuff in the AWT
(layouts and events) that you have probably
skimmed over.

> I will go back over them but to help, I will explain a little more of

Sounds like you need more experience with
the layouts of the AWT, do the tutorials on them
before you worry about Swing tutorials, which
presume you are comfortable with them.

> what end result I am looking for.

If you already know the result you are looking for,
draw a crude picture of it and post it on the net.
A picture speaks a thousand words.

You will probably get lots of suggestions of how
you can achieve particular layouts.

--
Andrew Thompson
* http://www.PhySci.org/ PhySci software suite
* http://www.1point1C.org/ 1.1C - Superluminal!
* http://www.AThompson.info/andrew/ personal site
Roedy Green - 23 Nov 2003 19:49 GMT
>Does anyone know of a site that shows the basic layout for a form that
>calls on methods in another class?

see http://mindprod.com/jgloss/tutorials.html

The Swing tutorials have lots of sample code.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.