1 package org.ozoneDB.adminGui.widget; 9 10 import javax.swing.*; 11 import java.awt.*; 12 13 16 public class QuickLabel extends JLabel { 17 18 public QuickLabel() { 19 super(); 20 } 21 22 public QuickLabel(String text) { 23 super(); 24 this.setText(text); 25 } 26 27 public QuickLabel(String text, Color foreground) { 28 super(); 29 this.setText(text); 30 setForeground(foreground); 31 } 32 33 public QuickLabel(String text, int fontStyle, float fontSize) { 34 super(); 35 this.setText(text, fontStyle, fontSize); 36 } 37 38 public void setText(String text, int fontStyle, float fontSize) { 39 40 setFont(getFont().deriveFont(fontStyle, fontSize)); 41 this.setText(text); 42 } 43 } 44 | Popular Tags |