Skip to content

Commit 487450c

Browse files
author
Abhishek Kumar
committed
8216471: GTK LnF: Frame is clipped and does not show JTable,Tooltip and JTree demo in SwingSet2 demo
Reviewed-by: psadhukhan, achung
1 parent 29f0f17 commit 487450c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/demo/share/jfc/SwingSet2/SwingSet2.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2007, 2024, Oracle and/or its affiliates. All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
66
* modification, are permitted provided that the following conditions
@@ -848,7 +848,14 @@ private void updateThisSwingSet() {
848848
if (frame == null) {
849849
SwingUtilities.updateComponentTreeUI(this);
850850
} else {
851+
if (currentLookAndFeel.name.contains("GTK")) {
852+
this.setPreferredSize(new Dimension(PREFERRED_WIDTH + 260, PREFERRED_HEIGHT + 80));
853+
} else {
854+
this.setPreferredSize(new Dimension(PREFERRED_WIDTH, PREFERRED_HEIGHT));
855+
}
856+
851857
SwingUtilities.updateComponentTreeUI(frame);
858+
frame.pack();
852859
}
853860

854861
SwingUtilities.updateComponentTreeUI(popupMenu);

0 commit comments

Comments
 (0)