/** * Function: paintComponent(Graphics g) * * @author ZackEvans * @param Graphics g * <p>round corners of textfield */ @Override protected void paintComponent(Graphics g) { g.setColor(getBackground()); g.fillRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 6, 6); super.paintComponent(g); }