corpus-services  1.0
DropPanel.java
Go to the documentation of this file.
1 /*
2  * To change this template, choose Tools | Templates
3  * and open the template in the editor.
4  */
5 
6 /*
7  * DropPanel.java
8  *
9  * Created on 21.09.2010, 10:46:53
10  */
11 
12 package de.uni_hamburg.corpora.swing;
13 
14 import javax.swing.ImageIcon;
15 
20 public class DropPanel extends javax.swing.JPanel {
21 
23  public DropPanel() {
24  initComponents();
25  }
26 
27  public void setIcon(ImageIcon icon){
28  jLabel1.setIcon(icon);
29  }
30 
36  @SuppressWarnings("unchecked")
37  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
38  private void initComponents() {
39 
40  jLabel1 = new javax.swing.JLabel();
41 
42  setBackground(new java.awt.Color(15, 155, 155));
43  setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createCompoundBorder(), "Drop corpus files here:", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Segoe UI", 1, 14), new java.awt.Color(255, 255, 255))); // NOI18N
44  setToolTipText("Drag corpus files here.");
45 
46  jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/droptarget.png")));
47  jLabel1.setToolTipText("Drag corpus file(s) here");
48  add(jLabel1);
49  }// </editor-fold>//GEN-END:initComponents
50 
51 
52  // Variables declaration - do not modify//GEN-BEGIN:variables
53  private javax.swing.JLabel jLabel1;
54  // End of variables declaration//GEN-END:variables
55 
56 }