1 package org.columba.mail.gui.message.viewer; 2 3 import java.awt.Color ; 4 import java.awt.Graphics ; 5 6 import javax.swing.JComponent ; 7 import javax.swing.JDialog ; 8 9 public class TransparentBackground extends JComponent { 10 11 public TransparentBackground(JDialog dialog) { 12 setOpaque(true); 13 14 } 16 17 18 19 public void paintComponent(Graphics g) { 20 g.setColor(Color.LIGHT_GRAY); 21 22 int x = 0; 23 int y = 0; 24 int width = getWidth(); 25 int height = getHeight(); 26 27 g.drawRoundRect(x, y, width - 1, height - 1, 5, 5); 28 } 29 } 30 | Popular Tags |