You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Shahzad Bhatti <sb...@peak6.com> on 2010/03/31 01:23:11 UTC

Calling setContent

I am writing an application that requires a login, and only after successful login it starts the actual application. I decided to define a container in top level wtkx file and then load wtkx file for login. I then set  contents of the top container to the contents of the login window. For example,
   <content>
        <Border wtkx:id="container" styles="{backgroundColor:null, padding:2}">
            <content>
            </content>
        </Border>
    </content>

Here is how I load the top wtkx file:
WTKXSerializer wtkxSerializer = new WTKXSerializer(); window = (Window) wtkxSerializer.readObject(this, "root.wtkx"); contentPane = (Border) wtkxSerializer.get(" container");
window.open(display);

I then load wtkx file for login using WTKXSerializer, and then call setContent on the top level container, e.g.
       contentPane.setContent(newWindow);
However, I am getting this error:

java.lang.IllegalArgumentException: Window parent must be null or display.    at org.apache.pivot.wtk.Window.setParent(Unknown Source)    at org.apache.pivot.wtk.Container.insert(Unknown Source)    at org.apache.pivot.wtk.Container.add(Unknown Source)    at org.apache.pivot.wtk.Border.setContent(Unknown Source)    at com.peak6.oh.client.ui.Main.startup(Main.java:183)

Can someone suggest how to fix it or better way to design such UI. Thanks.

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

Re: Collapsible Groups in a table

Posted by Greg Brown <gk...@mac.com>.
TableView doesn't support this natively. However, you may be able to use a combination of TableView and Rollup to achieve this behavior.

On Apr 6, 2010, at 4:27 PM, Shahzad Bhatti wrote:

> I am trying to store data in TableView, which is grouped by date. I would like to add all this data such that, the user can click on the group/section and it would collapse all rows under that group (or date). I am not sure if there is a native support for this, but would welcome any ideas. Thanks.
> 
> ______________________________________________
> 
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email


Collapsible Groups in a table

Posted by Shahzad Bhatti <sb...@peak6.com>.
I am trying to store data in TableView, which is grouped by date. I would like to add all this data such that, the user can click on the group/section and it would collapse all rows under that group (or date). I am not sure if there is a native support for this, but would welcome any ideas. Thanks.

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

Re: Debugging AWT-EventQueue

Posted by Greg Brown <gk...@mac.com>.
That's too bad, because I fixed an IndexOutOfBoundsException in TerraTableViewSkin for Pivot 1.5 that was related to variable row heights. Oh well.

If you need any help getting the debug code running, let us know. It would be very easy for us to post a set of compiled debug binaries, for example.

On Apr 5, 2010, at 4:48 PM, Shahzad Bhatti wrote:

> No, I am not using row heights. Thanks.
> 
> 
> 
> On 4/5/10 11:29 AM, "Greg Brown" <gk...@mac.com> wrote:
> 
> Are you using variable row heights by any chance?
> 
> On Apr 5, 2010, at 2:24 PM, Shahzad Bhatti wrote:
> 
>> I have created it under: https://issues.apache.org/jira/browse/PIVOT-451. I will try to use trunk with debug information to debug it. Thanks.
>> 
>> 
>> 
>> 
>> On 4/2/10 5:49 AM, "Todd Volkert" <tv...@gmail.com> wrote:
>> 
>> Yikes.  If you're running off of Pivot 1.4, there's no much you can do, because debug symbols have been removed from the jars.  If you're running off the trunk, you can compile with debug turned on and get more info.
>> 
>> Can you file an issue in JIRA so we can track this?
>> 
>> Thanks!
>> -T
>> 
>> On Thu, Apr 1, 2010 at 7:13 PM, Shahzad Bhatti <sb...@peak6.com> wrote:
>> I am seeing following error, but it's not showing my application in the stack trace. Is there a good way to debug these kind of errors? Thanks.
>> 
>> Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: index 6 out of bounds.    at org.apache.pivot.collections.ArrayList.verifyIndexBounds(Unknown Source)    at org.apache.pivot.collections.ArrayList.get(Unknown Source)    at org.apache.pivot.wtk.skin.terra.TerraTableViewSkin.paint(Unknown Source)    at org.apache.pivot.wtk.Component.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintDisplay(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintVolatileBuffered(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.update(Unknown Source)    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:267)    at sun.awt.RepaintArea.paint(RepaintArea.java:233)    at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)    at java.awt.Component.dispatchEventImpl(Component.java:4790)    at java.awt.Component.dispatchEvent(Component.java:4544)    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>> 
>> ______________________________________________
>> 
>> See  http://www.peak6.com/email_disclaimer.php
>> for terms and conditions related to this email
>> 
>> 
> 
> 


Re: Debugging AWT-EventQueue

Posted by Shahzad Bhatti <sb...@peak6.com>.
No, I am not using row heights. Thanks.



On 4/5/10 11:29 AM, "Greg Brown" <gk...@mac.com> wrote:

Are you using variable row heights by any chance?

On Apr 5, 2010, at 2:24 PM, Shahzad Bhatti wrote:

> I have created it under: https://issues.apache.org/jira/browse/PIVOT-451. I will try to use trunk with debug information to debug it. Thanks.
>
>
>
>
> On 4/2/10 5:49 AM, "Todd Volkert" <tv...@gmail.com> wrote:
>
> Yikes.  If you're running off of Pivot 1.4, there's no much you can do, because debug symbols have been removed from the jars.  If you're running off the trunk, you can compile with debug turned on and get more info.
>
> Can you file an issue in JIRA so we can track this?
>
> Thanks!
> -T
>
> On Thu, Apr 1, 2010 at 7:13 PM, Shahzad Bhatti <sb...@peak6.com> wrote:
> I am seeing following error, but it's not showing my application in the stack trace. Is there a good way to debug these kind of errors? Thanks.
>
> Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: index 6 out of bounds.    at org.apache.pivot.collections.ArrayList.verifyIndexBounds(Unknown Source)    at org.apache.pivot.collections.ArrayList.get(Unknown Source)    at org.apache.pivot.wtk.skin.terra.TerraTableViewSkin.paint(Unknown Source)    at org.apache.pivot.wtk.Component.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintDisplay(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintVolatileBuffered(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.update(Unknown Source)    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:267)    at sun.awt.RepaintArea.paint(RepaintArea.java:233)    at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)    at java.awt.Component.dispatchEventImpl(Component.java:4790)    at java.awt.Component.dispatchEvent(Component.java:4544)    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>
> ______________________________________________
>
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email
>
>



Re: Debugging AWT-EventQueue

Posted by Greg Brown <gk...@mac.com>.
Are you using variable row heights by any chance?

On Apr 5, 2010, at 2:24 PM, Shahzad Bhatti wrote:

> I have created it under: https://issues.apache.org/jira/browse/PIVOT-451. I will try to use trunk with debug information to debug it. Thanks.
> 
> 
> 
> 
> On 4/2/10 5:49 AM, "Todd Volkert" <tv...@gmail.com> wrote:
> 
> Yikes.  If you're running off of Pivot 1.4, there's no much you can do, because debug symbols have been removed from the jars.  If you're running off the trunk, you can compile with debug turned on and get more info.
> 
> Can you file an issue in JIRA so we can track this?
> 
> Thanks!
> -T
> 
> On Thu, Apr 1, 2010 at 7:13 PM, Shahzad Bhatti <sb...@peak6.com> wrote:
> I am seeing following error, but it's not showing my application in the stack trace. Is there a good way to debug these kind of errors? Thanks.
> 
> Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: index 6 out of bounds.    at org.apache.pivot.collections.ArrayList.verifyIndexBounds(Unknown Source)    at org.apache.pivot.collections.ArrayList.get(Unknown Source)    at org.apache.pivot.wtk.skin.terra.TerraTableViewSkin.paint(Unknown Source)    at org.apache.pivot.wtk.Component.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintDisplay(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintVolatileBuffered(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.update(Unknown Source)    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:267)    at sun.awt.RepaintArea.paint(RepaintArea.java:233)    at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)    at java.awt.Component.dispatchEventImpl(Component.java:4790)    at java.awt.Component.dispatchEvent(Component.java:4544)    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
> 
> ______________________________________________
> 
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email
> 
> 


Re: Debugging AWT-EventQueue

Posted by Shahzad Bhatti <sb...@peak6.com>.
I have created it under: https://issues.apache.org/jira/browse/PIVOT-451. I will try to use trunk with debug information to debug it. Thanks.




On 4/2/10 5:49 AM, "Todd Volkert" <tv...@gmail.com> wrote:

Yikes.  If you're running off of Pivot 1.4, there's no much you can do, because debug symbols have been removed from the jars.  If you're running off the trunk, you can compile with debug turned on and get more info.

Can you file an issue in JIRA so we can track this?

Thanks!
-T

On Thu, Apr 1, 2010 at 7:13 PM, Shahzad Bhatti <sb...@peak6.com> wrote:
I am seeing following error, but it's not showing my application in the stack trace. Is there a good way to debug these kind of errors? Thanks.

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: index 6 out of bounds.    at org.apache.pivot.collections.ArrayList.verifyIndexBounds(Unknown Source)    at org.apache.pivot.collections.ArrayList.get(Unknown Source)    at org.apache.pivot.wtk.skin.terra.TerraTableViewSkin.paint(Unknown Source)    at org.apache.pivot.wtk.Component.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintDisplay(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintVolatileBuffered(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.update(Unknown Source)    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:267)    at sun.awt.RepaintArea.paint(RepaintArea.java:233)    at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)    at java.awt.Component.dispatchEventImpl(Component.java:4790)    at java.awt.Component.dispatchEvent(Component.java:4544)    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email



Re: Debugging AWT-EventQueue

Posted by Todd Volkert <tv...@gmail.com>.
Yikes.  If you're running off of Pivot 1.4, there's no much you can do,
because debug symbols have been removed from the jars.  If you're running
off the trunk, you can compile with debug turned on and get more info.

Can you file an issue in JIRA so we can track this?

Thanks!
-T

On Thu, Apr 1, 2010 at 7:13 PM, Shahzad Bhatti <sb...@peak6.com> wrote:

> I am seeing following error, but it's not showing my application in the
> stack trace. Is there a good way to debug these kind of errors? Thanks.
>
> Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException:
> index 6 out of bounds.    at
> org.apache.pivot.collections.ArrayList.verifyIndexBounds(Unknown Source)
>  at org.apache.pivot.collections.ArrayList.get(Unknown Source)    at
> org.apache.pivot.wtk.skin.terra.TerraTableViewSkin.paint(Unknown Source)
>  at org.apache.pivot.wtk.Component.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.Container.paint(Unknown Source)    at
> org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintDisplay(Unknown
> Source)    at
> org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintVolatileBuffered(Unknown
> Source)    at
> org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Unknown Source)
>  at org.apache.pivot.wtk.ApplicationContext$DisplayHost.update(Unknown
> Source)    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:267)
>  at sun.awt.RepaintArea.paint(RepaintArea.java:233)    at
> apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)    at
> java.awt.Component.dispatchEventImpl(Component.java:4790)    at
> java.awt.Component.dispatchEvent(Component.java:4544)    at
> java.awt.EventQueue.dispatchEvent(EventQueue.java:635)    at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
>    at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
>    at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
>    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
>    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
>    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
>
> ______________________________________________
>
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email
>

Debugging AWT-EventQueue

Posted by Shahzad Bhatti <sb...@peak6.com>.
I am seeing following error, but it's not showing my application in the stack trace. Is there a good way to debug these kind of errors? Thanks.

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: index 6 out of bounds.    at org.apache.pivot.collections.ArrayList.verifyIndexBounds(Unknown Source)    at org.apache.pivot.collections.ArrayList.get(Unknown Source)    at org.apache.pivot.wtk.skin.terra.TerraTableViewSkin.paint(Unknown Source)    at org.apache.pivot.wtk.Component.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.Container.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintDisplay(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paintVolatileBuffered(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.paint(Unknown Source)    at org.apache.pivot.wtk.ApplicationContext$DisplayHost.update(Unknown Source)    at sun.awt.RepaintArea.updateComponent(RepaintArea.java:267)    at sun.awt.RepaintArea.paint(RepaintArea.java:233)    at apple.awt.ComponentModel.handleEvent(ComponentModel.java:263)    at java.awt.Component.dispatchEventImpl(Component.java:4790)    at java.awt.Component.dispatchEvent(Component.java:4544)    at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

Re: Calling setContent

Posted by Shahzad Bhatti <sb...@peak6.com>.
Thanks Greg.


On 3/30/10 5:25 PM, "Greg Brown" <gk...@mac.com> wrote:

You are getting this error because you can't add a window to another window - could you just define another file called content.wtkx and load that at login? The root element of this file would be whatever you are currently defining as the content of newWindow.


On Mar 30, 2010, at 7:23 PM, Shahzad Bhatti wrote:

> I am writing an application that requires a login, and only after successful login it starts the actual application. I decided to define a container in top level wtkx file and then load wtkx file for login. I then set  contents of the top container to the contents of the login window. For example,
>   <content>
>        <Border wtkx:id="container" styles="{backgroundColor:null, padding:2}">
>            <content>
>            </content>
>        </Border>
>    </content>
>
> Here is how I load the top wtkx file:
> WTKXSerializer wtkxSerializer = new WTKXSerializer(); window = (Window) wtkxSerializer.readObject(this, "root.wtkx"); contentPane = (Border) wtkxSerializer.get(" container");
> window.open(display);
>
> I then load wtkx file for login using WTKXSerializer, and then call setContent on the top level container, e.g.
>       contentPane.setContent(newWindow);
> However, I am getting this error:
>
> java.lang.IllegalArgumentException: Window parent must be null or display.    at org.apache.pivot.wtk.Window.setParent(Unknown Source)    at org.apache.pivot.wtk.Container.insert(Unknown Source)    at org.apache.pivot.wtk.Container.add(Unknown Source)    at org.apache.pivot.wtk.Border.setContent(Unknown Source)    at com.peak6.oh.client.ui.Main.startup(Main.java:183)
>
> Can someone suggest how to fix it or better way to design such UI. Thanks.
>
> ______________________________________________
>
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email



Re: Calling setContent

Posted by Greg Brown <gk...@mac.com>.
You are getting this error because you can't add a window to another window - could you just define another file called content.wtkx and load that at login? The root element of this file would be whatever you are currently defining as the content of newWindow.


On Mar 30, 2010, at 7:23 PM, Shahzad Bhatti wrote:

> I am writing an application that requires a login, and only after successful login it starts the actual application. I decided to define a container in top level wtkx file and then load wtkx file for login. I then set  contents of the top container to the contents of the login window. For example,
>   <content>
>        <Border wtkx:id="container" styles="{backgroundColor:null, padding:2}">
>            <content>
>            </content>
>        </Border>
>    </content>
> 
> Here is how I load the top wtkx file:
> WTKXSerializer wtkxSerializer = new WTKXSerializer(); window = (Window) wtkxSerializer.readObject(this, "root.wtkx"); contentPane = (Border) wtkxSerializer.get(" container");
> window.open(display);
> 
> I then load wtkx file for login using WTKXSerializer, and then call setContent on the top level container, e.g.
>       contentPane.setContent(newWindow);
> However, I am getting this error:
> 
> java.lang.IllegalArgumentException: Window parent must be null or display.    at org.apache.pivot.wtk.Window.setParent(Unknown Source)    at org.apache.pivot.wtk.Container.insert(Unknown Source)    at org.apache.pivot.wtk.Container.add(Unknown Source)    at org.apache.pivot.wtk.Border.setContent(Unknown Source)    at com.peak6.oh.client.ui.Main.startup(Main.java:183)
> 
> Can someone suggest how to fix it or better way to design such UI. Thanks.
> 
> ______________________________________________
> 
> See  http://www.peak6.com/email_disclaimer.php
> for terms and conditions related to this email