Skip to content

Commit 7ea6ee9

Browse files
hansonrhansonr
authored andcommitted
isWindowOrJSApplet()
1 parent e1b0c1f commit 7ea6ee9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSTableUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private JSComponent getCellComponent(TableCellRenderer renderer, int row, int co
249249
JSComponentUI ui = ((JSComponentUI) c.getUI());
250250
boolean wasDisabled = ui.isUIDisabled;
251251
ui.setRenderer(c, w, h);
252-
ui.targetParent = table;
252+
ui.setTargetParent(table);
253253
if (fullPaint && wasDisabled || cNoPrep != null) {
254254
// repeat, now that the UI is enabled
255255
if (wasDisabled)

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSToolBarUI.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,9 @@ protected DragWindow createDragWindow(JToolBar toolbar) {
542542
Window frame = null;
543543
if (toolBar != null) {
544544
Container p;
545-
for (p = toolBar.getParent(); p != null && !(p instanceof Window); p = p.getParent())
545+
for (p = toolBar.getParent(); p != null && !p.isWindowOrJSApplet(); p = p.getParent())
546546
;
547-
if (p != null && p instanceof Window)
547+
if (p != null && p.isWindowOrJSApplet())
548548
frame = (Window) p;
549549
}
550550
if (floatingToolBar == null) {

0 commit comments

Comments
 (0)