B
beauforthax
Hello,
Probably, since I updated Netbeans or JDK (but not sure it is
a reason of problems), there is a problem with persistence
of window state between sessions.
Before, when I changed something (eg. table's size of column,
SplitPane splitter position), closed the application and then
started it again, all settings were the same as I set.
Now, when I close my application, no settings from main form
are stored -- when I run app again, it looks "default".
On my app's menu, there is "about box" and one simple dialog
with table -- state of these two is stored and restored properly
(even, after closing application, two files are created:
Form.session.xml and aboutBox.session.xml -- these two
I paste below; there is not created any file which seemed
to be connected with main form).
The problem is both under Windows XP and Fedora 9.
My configuration:
Windows XP: jdk1.6.0_02, netbeans 6.1
Fedora 9: jdk1.6.0_06
I would be glad if you could provide me with some solution.
Thanks in advance.
Regards,
Beaufort Hax
Form.session.xml (probably connected with my simple dialog with one
table
and button available on menu):
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_02" class="java.beans.XMLDecoder">
<object class="java.util.HashMap">
<void method="put">
<string>Form</string>
<object class="org.jdesktop.application.SessionStorage
$WindowState">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>380</int>
<int>282</int>
<int>520</int>
<int>557</int>
</object>
</void>
<void property="graphicsConfigurationBounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>0</int>
<int>1280</int>
<int>1024</int>
</object>
</void>
<void property="screenCount">
<int>1</int>
</void>
</object>
</void>
<void method="put">
<string>jTable1/JViewport0/jScrollPane1/jPanel1/null.contentPane/
null.layeredPane/JRootPane0/Form</string>
<object class="org.jdesktop.application.SessionStorage
$TableState">
<void property="columnWidths">
<array class="int" length="3">
<void index="0">
<int>150</int>
</void>
<void index="1">
<int>151</int>
</void>
<void index="2">
<int>150</int>
</void>
</array>
</void>
</object>
</void>
</object>
</java>
aboutBox.session.xml (my about box):
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_02" class="java.beans.XMLDecoder">
<object class="java.util.HashMap">
<void method="put">
<string>aboutBox</string>
<object class="org.jdesktop.application.SessionStorage
$WindowState">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>263</int>
<int>365</int>
<int>755</int>
<int>294</int>
</object>
</void>
<void property="graphicsConfigurationBounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>0</int>
<int>1280</int>
<int>1024</int>
</object>
</void>
<void property="screenCount">
<int>1</int>
</void>
</object>
</void>
</object>
</java>
Probably, since I updated Netbeans or JDK (but not sure it is
a reason of problems), there is a problem with persistence
of window state between sessions.
Before, when I changed something (eg. table's size of column,
SplitPane splitter position), closed the application and then
started it again, all settings were the same as I set.
Now, when I close my application, no settings from main form
are stored -- when I run app again, it looks "default".
On my app's menu, there is "about box" and one simple dialog
with table -- state of these two is stored and restored properly
(even, after closing application, two files are created:
Form.session.xml and aboutBox.session.xml -- these two
I paste below; there is not created any file which seemed
to be connected with main form).
The problem is both under Windows XP and Fedora 9.
My configuration:
Windows XP: jdk1.6.0_02, netbeans 6.1
Fedora 9: jdk1.6.0_06
I would be glad if you could provide me with some solution.
Thanks in advance.
Regards,
Beaufort Hax
Form.session.xml (probably connected with my simple dialog with one
table
and button available on menu):
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_02" class="java.beans.XMLDecoder">
<object class="java.util.HashMap">
<void method="put">
<string>Form</string>
<object class="org.jdesktop.application.SessionStorage
$WindowState">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>380</int>
<int>282</int>
<int>520</int>
<int>557</int>
</object>
</void>
<void property="graphicsConfigurationBounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>0</int>
<int>1280</int>
<int>1024</int>
</object>
</void>
<void property="screenCount">
<int>1</int>
</void>
</object>
</void>
<void method="put">
<string>jTable1/JViewport0/jScrollPane1/jPanel1/null.contentPane/
null.layeredPane/JRootPane0/Form</string>
<object class="org.jdesktop.application.SessionStorage
$TableState">
<void property="columnWidths">
<array class="int" length="3">
<void index="0">
<int>150</int>
</void>
<void index="1">
<int>151</int>
</void>
<void index="2">
<int>150</int>
</void>
</array>
</void>
</object>
</void>
</object>
</java>
aboutBox.session.xml (my about box):
<?xml version="1.0" encoding="UTF-8"?>
<java version="1.6.0_02" class="java.beans.XMLDecoder">
<object class="java.util.HashMap">
<void method="put">
<string>aboutBox</string>
<object class="org.jdesktop.application.SessionStorage
$WindowState">
<void property="bounds">
<object class="java.awt.Rectangle">
<int>263</int>
<int>365</int>
<int>755</int>
<int>294</int>
</object>
</void>
<void property="graphicsConfigurationBounds">
<object class="java.awt.Rectangle">
<int>0</int>
<int>0</int>
<int>1280</int>
<int>1024</int>
</object>
</void>
<void property="screenCount">
<int>1</int>
</void>
</object>
</void>
</object>
</java>