Skip to content

Instantly share code, notes, and snippets.

View 6dc's full-sized avatar
🧑‍💻

6dc 6dc

🧑‍💻
View GitHub Profile
@6dc
6dc / JTabbedPaneCloseButton.java
Created June 4, 2014 07:31
A Util class which auto add a close button in a jtabbedpane
import javax.swing.*;
import javax.swing.plaf.metal.MetalIconFactory;
import java.awt.*;
import java.awt.event.MouseListener;
import java.awt.event.MouseEvent;
/**
* @author 6dc
*
* A class which creates a JTabbedPane and auto sets a close button when you add a tab
@6dc
6dc / JEditMenuBar.java
Created June 4, 2014 07:05
Simple Util-class which adds the edit jmenuitem to your jmenubar
import javax.swing.*;
import javax.swing.text.DefaultEditorKit;
import java.awt.event.KeyEvent;
/**
* @author 6dc
*
* This simple util class is used to have copy, paste, cut menubar + shortcuts (based on windows defaults)
*/
@6dc
6dc / src_eu_dc_lib_Command.java
Last active June 17, 2021 09:01
DcAPI - This API makes registering commands & Listeners simple: Download the jar here: http://6dc.eu/DcAPI/DcAPI.jar
package eu.dc.lib;
import java.util.Arrays;
import org.bukkit.entity.Player;
public abstract class Command {
protected org.bukkit.command.Command cmd;
protected String[] args;
protected Player p;