public void internalFrameClosed(InternalFrameEvent e) { Component cont = getParent(); while ((cont != null) && (!(cont instanceof JInternalFrame))) { cont = cont.getParent(); } if (cont != null) { if (!((JInternalFrame) cont).isClosed()) { refreshMe(); } } }
// Overridden for performance reasons. ----> @Override public boolean isOpaque() { Color back = getBackground(); Component p = getParent(); if (Objects.nonNull(p)) { p = p.getParent(); } // p should now be the JTable. boolean colorMatch = Objects.nonNull(back) && Objects.nonNull(p) && back.equals(p.getBackground()) && p.isOpaque(); return !colorMatch && super.isOpaque(); }