Graphics2D g2d = (Graphics2D) clipg;
g2d.setStroke(STROKE);
g2d.setColor(RED_COLOR);
Rectangle bounds;
if (inDesktop){
JInternalFrame jif = (JInternalFrame) adaptable.getWidget();
Component rootPane = jif.getRootPane();
bounds = SwingUtilities.getLocalBounds(rootPane);
bounds = SwingUtilities.convertRectangle(rootPane, bounds, jif);
}else{
JInternalFrame jif = (JInternalFrame) adaptable.getWidget();
JMenuBar jmenuBar = jif.getJMenuBar();
bounds = SwingUtilities.getLocalBounds(jmenuBar);
bounds = SwingUtilities.convertRectangle(jmenuBar, bounds, adaptable.getWidget());
}
g2d.drawRect(bounds.x, bounds.y, bounds.width, 22);
} else if (dropStatus == DROPPING_PERMITTED) {
Graphics2D g2d = (Graphics2D) clipg;
g2d.setStroke(STROKE);
g2d.setColor(GREEN_COLOR);
Rectangle bounds;
if (inDesktop){
JInternalFrame jif = (JInternalFrame) adaptable.getWidget();
Component rootPane = jif.getRootPane();
bounds = SwingUtilities.getLocalBounds(rootPane);
bounds = SwingUtilities.convertRectangle(rootPane, bounds, jif);
}else{
bounds = SwingUtilities.getLocalBounds(adaptable.getContentPane());
bounds = SwingUtilities.convertRectangle(adaptable.getContentPane(), bounds, adaptable.getWidget());