Skip to content

Instantly share code, notes, and snippets.

@moomoohk
moomoohk / ControlPanel.java
Created April 23, 2013 18:30
Control panel for D-Shizzwitt
package dylan;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
@moomoohk
moomoohk / CircularArrayList.java
Last active December 16, 2015 12:38
Added swap method
package mishael;
import java.util.ArrayList;
import java.util.Random;
public class CircularArrayList<Generic>
{
private ArrayList<Generic> a;
public CircularArrayList()
package psi;
import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
public class OSUtils
{
private static String cachedUserHome;
public static enum OS
{
WINDOWS, UNIX, MACOSX, OTHER,
}
static
@moomoohk
moomoohk / gist:4650110
Created January 27, 2013 19:53
My config class. Uses Java properties instead of XML. Works fine when bundled in a JAR and run in the OS (as opposed to being run in the IDE). I made it a while ago so I don't really remember how everything works, or how efficient it is...
package com.moomoohk.ThreeD;
import java.util.prefs.Preferences;
public class Config
{
public static Preferences prefs = Preferences.userNodeForPackage(Config.class);
public void save(String key, int val)
{