AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Swing question

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
john smith
Guest





PostPosted: Sat Mar 26, 2005 8:36 pm    Post subject: Swing question Reply with quote



I am creating a GUI interface.

On one of my panels, I want to have a grid on it. I have no idea how I
would do this or if this is even possible.
Any ideas.

On another panel I need to display the attribute name and attribute value
from an XML document, and want to have this look like a table format.
Can someone give me some ideas of how to do this? or point me to a website
or book?

I am familiar with basic widget in Swing, but not sure how to do more
complex stuff.

Thanks for any help.

so for example

-------------------------------------
attribute1 | attribute value
-------------------------------------
attribute2 | attribute value
-------------------------------------
attribute3 | attribute value
-----------------------------------





Thanks,


Back to top
JFalt
Guest





PostPosted: Mon Mar 28, 2005 7:09 pm    Post subject: Re: Swing question Reply with quote



On one of my panels, I want to have a grid on it. I have no idea how I

would do this or if this is even possible.

-- Use GridLayout
-- Alternatively insert a JTable

On another panel I need to display the attribute name and attribute
value
from an XML document, and want to have this look like a table format.

--Use JTable

Documentation and use for these components can be found at
http://java.sun.com/j2se/1.5.0/docs/api

For the XML, there are lots of ways to handle the data. One such way
is using the following libraries:
org.w3c.dom.Document
org.w3c.dom.NamedNodeMap
org.w3c.dom.NodeList

In this approach, use DocumentBuilderFactory to parse the xml file into
a Document.
Use the NodeList to enumerate the Nodes in the Document and iterate
through them.
Use the NamedNodeMap to enumerate the attributes of the Nodes in
NodeList.

Hope this helps
JFalt

Back to top
JFalt
Guest





PostPosted: Mon Mar 28, 2005 7:10 pm    Post subject: Re: Swing question Reply with quote



On one of my panels, I want to have a grid on it. I have no idea how I

would do this or if this is even possible.

-- Use GridLayout
-- Alternatively insert a JTable

On another panel I need to display the attribute name and attribute
value
from an XML document, and want to have this look like a table format.

--Use JTable

Documentation and use for these components can be found at
http://java.sun.com/j2se/1.5.0/docs/api

For the XML, there are lots of ways to handle the data. One such way
is using the following libraries:
org.w3c.dom.Document
org.w3c.dom.NamedNodeMap
org.w3c.dom.NodeList

In this approach, use DocumentBuilderFactory to parse the xml file into
a Document.
Use the NodeList to enumerate the Nodes in the Document and iterate
through them.
Use the NamedNodeMap to enumerate the attributes of the Nodes in
NodeList.

Hope this helps
JFalt

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.