/* * FrameTitle.java * * Created on 20. J�nner 2006, 08:01 */ package at.lux.fotoannotation.panels.components; import java.awt.*; /** * * @author mlux */ public class FrameTitle extends javax.swing.JPanel { Color light = Color.decode("#A6CAF0"); Color dark = Color.decode("#0A246A"); /** Creates new form FrameTitle */ public FrameTitle() { initComponents(); // bgColorPanel.setBackground(Color.decode("#9CB1FF")); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { bgColorPanel = new javax.swing.JPanel(); title = new javax.swing.JLabel(); setLayout(new java.awt.BorderLayout()); setBorder(javax.swing.BorderFactory.createEtchedBorder()); bgColorPanel.setLayout(new java.awt.BorderLayout()); bgColorPanel.setBackground(new java.awt.Color(10, 35, 107)); title.setFont(new java.awt.Font("Tahoma", 1, 12)); title.setForeground(new java.awt.Color(255, 255, 255)); title.setText("My Configuration Dialog"); title.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 4, 2, 4)); bgColorPanel.add(title, java.awt.BorderLayout.CENTER); add(bgColorPanel, java.awt.BorderLayout.CENTER); }// </editor-fold>//GEN-END:initComponents protected void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D) g; Paint p = g2.getPaint(); GradientPaint gp = new GradientPaint(0f,0f, dark, getWidth(), 0f, light); g2.setPaint(gp); g2.fillRect(0,0,getWidth(), getHeight()); g2.setPaint(p); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel bgColorPanel; public javax.swing.JLabel title; // End of variables declaration//GEN-END:variables }