Looking for a starting point

P

printdude1968

I need to write a Java program which is your standard Add/Change/Delete
GUI. Can anyone recommend a book or website (besides the Sun tutorial)
that can help me get a start. Should I approach it top down or bottom
up? I have a pretty good idea what I want the structure of it to look
like, but coming from a procedural language background, I'm hoping some
of the folks in this group have written similar code and can point me
to a good place to start.

Thanks....

And Happy New Year from the East Coast of Canada
 
J

jupiter

I need to write a Java program which is your standard
Add/Change/Delete
GUI. Can anyone recommend a book or website (besides the Sun
tutorial)
that can help me get a start. Should I approach it top down or
bottom
up? I have a pretty good idea what I want the structure of it to
look
like, but coming from a procedural language background, I'm
hoping some
of the folks in this group have written similar code and can
point me
to a good place to start.

Thanks....

And Happy New Year from the East Coast of Canada

Hey, I'll be curious to see what gets recommended. I borrowed a
Swing book and can't remember the name of it, but it was
indispensable. So was Google/API. The GUI stuff was much more
OOP-rigorous than what I had expected. There is craploads of
method overrwrites to do, at least if you're foolish enough to do
what I did: Editable table that could be persisted to file after
changes. Oh, what fun - fancy colors and fonts for alternate rows,
the whole nine yards. It's pretty, damn it, and it works. But it
was like descending into the realm of the absurd to get it to work
right. It's like fifty times more fun than any man should be
allowed to have.
 
R

Rhino

I need to write a Java program which is your standard Add/Change/Delete
GUI. Can anyone recommend a book or website (besides the Sun tutorial)
that can help me get a start. Should I approach it top down or bottom
up? I have a pretty good idea what I want the structure of it to look
like, but coming from a procedural language background, I'm hoping some
of the folks in this group have written similar code and can point me
to a good place to start.

Thanks....
I'd say the answer depends to some extent on what kind of prograqm you are
writing.

Is this an application, applet, midlet, or servlet? If it is a servlet, I
suppose most people would recommend some kind of framework, although I'm not
sure which ones are fashionable at the moment. For applets or midlets, you'd
probably get a different answer than for servlets and I applications might
get you a different answer again.
And Happy New Year from the East Coast of Canada
Same to you from the center (more-or-less) of Canada :)
 
J

John O'Conner

I need to write a Java program which is your standard Add/Change/Delete
GUI. Can anyone recommend a book or website (besides the Sun tutorial)
that can help me get a start. Should I approach it top down or bottom
up? I have a pretty good idea what I want the structure of it to look
like, but coming from a procedural language background, I'm hoping some
of the folks in this group have written similar code and can point me
to a good place to start.

The article ""Using Java DB in Desktop Applications"
(http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javadb/)
has Add/Change/Delete buttons in its GUI. I can't say that the GUI
follows best practices for visual design, but the application has
standard event handlers for those buttons, and it demonstrates how to
link a GUI's components with their handlers. Might be useful.

The only significant problem with this particular GUI is that it
performs DB queries on the Swing event dispatch thread. Typically that
is a problem since GUIs can become sluggish or unresponsive. In this
demo, the db is local and extremely small, so no perceived problems
exist. You might consider Java SE 6's SwingWorker class to offload
long-running tasks from the GUI...the subject of my next article on
java.sun.com coming in mid January.

Regards,
John O'Conner
 
G

Greg R. Broderick

I need to write a Java program which is your standard Add/Change/Delete
GUI. Can anyone recommend a book or website (besides the Sun tutorial)
that can help me get a start. Should I approach it top down or bottom
up? I have a pretty good idea what I want the structure of it to look
like, but coming from a procedural language background

I'd recommend that you first concentrate on learning object-oriented
programming and design before attempting something such as this, otherwise,
you'll just be writing procedural code in an object-oriented language's
clothing, and Java isn't particularly suitable for writing procedural code.

For books, you haven't told us enough about your current level of
expertise, but a generally good beginner's book is _Thinking_In_Java_ by
Bruce Eckel. Much of the book is available for free download on his web
site. This book will be a good starting point on the Java language as well
as a decent introduction to object-oriented programming.


Cheers!
GRB

--
---------------------------------------------------------------------
Greg R. Broderick (e-mail address removed)

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
 
P

printdude1968

I would say that despite having taken a couple of courses in Java, I am
still learning. I have written one program that I am using to parse an
XML file for certain pieces of information. It used JDom to ensure
well-formednes. While my experience may be limited, I have several
books on Java Development, including Thinking In Java, as well as a
number of other O'Reilly and Head First books. I was thinking that JSP
may almost be a better solution to the issue. I don't really "need" a
fancy GUI, just one that will let someone add to, change and delete
from an XML file. JSP might do the trick. However, my level of
experience in JSP is even lower than JAVA.

Thanks for your input.
 
A

Andrew Thompson

(e-mail address removed) wrote:

...top-posted a reply to a person who's sig. contains the words..

(in case you missed it)

Andrew T.
 
P

printdude1968

Andrew said:
(e-mail address removed) wrote:

..top-posted a reply to a person who's sig. contains the words..


(in case you missed it)

Andrew T.

Opps...my bad...sorry
 
P

printdude1968

Rhino said:
I'd say the answer depends to some extent on what kind of prograqm you are
writing.

Is this an application, applet, midlet, or servlet? If it is a servlet, I
suppose most people would recommend some kind of framework, although I'm not
sure which ones are fashionable at the moment. For applets or midlets, you'd
probably get a different answer than for servlets and I applications might
get you a different answer again.

Same to you from the center (more-or-less) of Canada :)

See that's the thing. I'm not even sure if I need to write a Java GUI
for this. Basically what I have is an XML file that I use to control
some print functionality (I do Tech Support.. printers are my gig).
The XML file is well formed and I use a Java program to parse it for
specific pieces of information. The problem is that if I use a normal
editor or even Eclipse, there's no guarantee that if changes are made
that they will maintain the wellformedness and this will cause my
process to crash (not good at 2am in the morning). So what I need is
some sort of tool that will let support people maintain this XML file
using Add/Change/Delete functions. It has to check for wellformedness
(I use JDom.. it works) and I also have to be able to copy the file to
one other location (two print servers). I was thinking that I could
just write a ksh script, but that would be really ugly, and since I
have a working knowledge of Java, I figured why not do a practical
application. The problem is that when I took my training, we covered 0
in the area of Swing/AWT. So perhaps Java isn't the ideal language.
Perhaps I could look into using plain HTML with some of the added
features I've learned about. Or even JSP as I've seen some pretty
sophisiticated JSP code recently. I'm thinking I need 4 main
classes... one for the main program and one for each of the functions.
I was hoping that I could use a JButton for each of the
Add/Change/Delete selections and have some JTextAreas that I could use
in the subsequent classes. But when I started looking at some of the
example (Cay Hortmann books that I have) I couldn't find any programs
that have the right combination of containers. I don't want to write
this from scratch. I was hoping to find an example in one of my books
or in some of the docs I have online and go from there... but no dice
so far....bummer too cuz it looks so nice to have a good GUI staring at
you rather than having to do all this by hand.
 
P

printdude1968

John said:
What I really meant to say is this:

The article's demo application has Add/Change/Delete buttons...
The demo's source code is available for download too.

Thanks.. I'll check it out.
 
J

John Ersatznom

jupiter said:
Editable table that could be persisted to file after
changes. Oh, what fun - fancy colors and fonts for alternate rows,
the whole nine yards. It's pretty, damn it, and it works. But it
was like descending into the realm of the absurd to get it to work
right. It's like fifty times more fun than any man should be
allowed to have.

You must have mistaken your fancy table control for my large collection
of Stephanie Seymour jpegs. ;)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top