Re: Programmatically make a TopComponent float by default

2021-11-17 Thread Arcturus Bootes
Thanks John for the reply. In the end what we did was use the WindowManager
like this:

WindowManager.getDefault().setTopComponentFloating(this, true);

/**
 * This loops through all the current windows and compares this top
 * components top level ancestor with the windows parent. If they
match
 * the window is our view so we set the location and the size of
 * the window.
 */
for (Window window : Window.getWindows()) {
if (this.getTopLevelAncestor() != null) {
if
(this.getTopLevelAncestor().getName().equals(window.getName())) {
window.setMinimumSize(new Dimension(485, 285));
window.setLocation((int)
Screen.getPrimary().getBounds().getMaxX() - 510, 110);
}
}
}

On Sat, 30 Oct 2021 at 20:07, John Kostaras  wrote:

> How about the trick mentioned in this article
>  (search for
> 'float')?
> To display the Layer XML, right click on your module, *New -> Other ->
> Module Development -> XML Layer*.
>
>
>
> On Thu, 28 Oct 2021 at 04:24, Arcturus Bootes 
> wrote:
>
> > Hi All,
> >
> > I have a NetBeans platform application I am working on and I would like
> to
> > have a TopComponent I am using "float" by default. I am not sure how to
> do
> > this and would be grateful if I can get some advice on any annotation or
> > something I can set to make it float by default.
> >
> > Thank you.
> >
>


Re: Programmatically make a TopComponent float by default

2021-10-30 Thread John Kostaras
How about the trick mentioned in this article
 (search for
'float')?
To display the Layer XML, right click on your module, *New -> Other ->
Module Development -> XML Layer*.



On Thu, 28 Oct 2021 at 04:24, Arcturus Bootes 
wrote:

> Hi All,
>
> I have a NetBeans platform application I am working on and I would like to
> have a TopComponent I am using "float" by default. I am not sure how to do
> this and would be grateful if I can get some advice on any annotation or
> something I can set to make it float by default.
>
> Thank you.
>


Programmatically make a TopComponent float by default

2021-10-27 Thread Arcturus Bootes
Hi All,

I have a NetBeans platform application I am working on and I would like to
have a TopComponent I am using "float" by default. I am not sure how to do
this and would be grateful if I can get some advice on any annotation or
something I can set to make it float by default.

Thank you.