Skip to content

Instantly share code, notes, and snippets.

View xranby's full-sized avatar
🧘
guru meditation

Xerxes Rånby xranby

🧘
guru meditation
View GitHub Profile
@xranby
xranby / Log.java
Created December 14, 2021 00:05
Log.java Productive Java logging measure the time in ms between two calls to System.out.println This allow simple java code to be benchmarked.
/*
Productive Java logging
measure the time in ms
between two calls to System.out.println
This allow simple java code to be benchmarked.
Have a great day!
- Xerxes Rånby
2021 12 14
/*
# This code is a NEWT JogAmp JOGL 2 port of:
# https://sites.google.com/site/justinscsstuff/jogl-tutorial-3
#
# Get the latest JogAmp JOGL 2
wget http://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z
7z x jogamp-all-platforms.7z
cd jogamp-all-platforms
# Compile this demo.
@brandonborkholder
brandonborkholder / From.java
Created October 18, 2012 01:40
Using GLG2D in an existing application
// all painting is done to this single JComponent (or subclass)
JComponent paintingCanvas = new JComponent() {
public void paintComponent(Graphics g) {
super.paintComponent(g);
// paint the scene to the Graphics object
}
};
JFrame frame = // ...