toto litoto

Greenhorn
+ Follow
since May 29, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by toto litoto

i accidentally mistyped and posted it...
all my apologizes....
21 years ago
JPanel myPanel = new JPanel();
Component[] componentsmyPanel.getComponents();
21 years ago
I am using JDK 1.4.0 (obviously, as I have problems with XMLEncoder... )
What I need to do is create a JFrame with some Swing components inside
(JPanel's, JLabel's, etc.), to save it as an XML file and be able to restore
it later.
Everything went OK at the beginning, but there came the time to manage the
layout part. For various reasons, the most appropriate layout manager for my
application is SpringLayout.
The first step was again OK: when defining a SpringLayout for a panel, this
property was transferred to the XML by XMLEncoder and restored by
XMLDecoder.
But then, the happy days are over! In order for a SpringLayout to work, one
must obviously define lots of SpringLayout.Constraints, using Spring's. But
none of these things are transferred by XMLEncoder to the XML.
And, quite naturally, even if I modify manually the XML to include some
constraint info, the XMLDecoder won't read that info!
Does anybody know if there is any trick about this? Or is there a known bug
concerning the serialization of Spring's, and you know about a workaround?
Thanks a lot,
Adrian
21 years ago
I am using JDK 1.4.0 (obviously, as I have problems with XMLEncoder... )
What I need to do is create a JFrame with some Swing components inside (JPanel's, JLabel's, etc.), to save it as an XML file and be able to restore it later.
Everything went OK at the beginning, but there came the time to manage the layout part. For various reasons, the most appropriate layout manager for my application is SpringLayout.
The first step was again OK: when defining a SpringLayout for a panel, this property was transferred to the XML by XMLEncoder and restored by XMLDecoder.
But then, the happy days are over! In order for a SpringLayout to work, one must obviously define lots of SpringLayout.Constraints, using Spring's. But none of these things are transferred by XMLEncoder to the XML.
And, quite naturally, even if I modify manually the XML to include some constraint info, the XMLDecoder won't read that info!
Does anybody know if there is any trick about this? Or is there a known bug concerning the serialization of Spring's, and you know about a workaround?
Thanks a lot,
Adrian
21 years ago