 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
john smith Guest
|
Posted: Sat Mar 26, 2005 8:36 pm Post subject: Swing question |
|
|
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
|
Posted: Mon Mar 28, 2005 7:09 pm Post subject: Re: Swing question |
|
|
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
|
Posted: Mon Mar 28, 2005 7:10 pm Post subject: Re: Swing question |
|
|
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 |
|
 |
|
|
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
|
|