/** * Paint component * * @param g Graphics object */ public void paintComponent(Graphics g) { super.paintComponent(g); g2 = (Graphics2D) g; if (font_antialiasing) { g2.setRenderingHints(qualityHints); } else { g2.setRenderingHints(normalHints); } if (first_draw) { // store initial width and height initial_width = this.getWidth(); initial_heigth = this.getHeight(); first_draw = false; } }
/** * Process component event.<br> * If the components are overlapping it resizes the parent window if required. * * @param e component event */ public void processComponentEvent(ComponentEvent e) { if (e.getID() == ComponentEvent.COMPONENT_RESIZED && resizing_required) { resize_timer.restart(); } super.processComponentEvent(e); }