Skip to content

Instantly share code, notes, and snippets.

package timerexample;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Observable;
import java.util.Observer;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Insets;
import java.util.regex.Pattern;
import javax.swing.Icon;
import javax.swing.JLabel;
/**
*
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import javax.swing.JLabel;
public class SignLabel extends JLabel implements MouseListener {
static boolean value = false;
public SignLabel() {
this.addMouseListener(this);
}
@bracco23
bracco23 / file-size.pipe.ts
Last active March 2, 2018 13:11 — forked from tnqsoft/human-file-size.pipe.ts
Angular 4 Human file size in English
import { Pipe, PipeTransform } from '@angular/core';
/*
* Convert bytes into largest possible unit.
* Takes an precision argument that defaults to 2.
* Usage:
* bytes | fileSize:precision
* Example:
* {{ 1024 | fileSize}}
* formats to: 1 KB