RFR: 8216471: GTK LnF: Frame is clipped and does not show JTable,Tooltip and JTree demo in SwingSet2 demo
Prasanta Sadhukhan
psadhukhan at openjdk.org
Thu Jul 11 14:11:55 UTC 2024
On Tue, 9 Jul 2024 12:30:21 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
> > > Also, is it possible to change the width only when GTK is loaded and not irrespectively?
> >
> >
> > Tried changing the frame width in [updateThisSwingSet](https://github.com/openjdk/jdk/blob/0e0dfca21f64ecfcb3e5ed7cdc2a173834faa509/src/demo/share/jfc/SwingSet2/SwingSet2.java#L846) method but it didn't work.
>
> I think I was doing it wrong. Changed the width and height only for GTK L&F now.
I believe setPreferredSize in the constructor is still needed, right?
I guess it will be better to use PREFERRED_WIDTH/HEIGHT+x instead of hardcoding the value..
It seems there is a lag when L&F changed from Java to GTK and the frame takes some time (approx 5 sec in my testing) to set its size to greater dimension.
Also, when moved back from GTK to Java, the height is less compared to what it started off initially in Java L&F and part of the JInternalFrame frame0 is cut off...Are you seeing the same?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20052#issuecomment-2223041734
More information about the client-libs-dev
mailing list