File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/demo/share/jfc/SwingSet2 Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 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 );
You can’t perform that action at this time.
0 commit comments