This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//package example; | |
//-*- mode:java; encoding:utf-8 -*- | |
// vim:set fileencoding=utf-8: | |
//http://java-swing-tips.blogspot.jp/2008/03/jprogressbar-in-jtable-cell.html | |
//at.terai@gmail.com | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.util.*; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
window.onload = function() { | |
var canvas = document.getElementById('canvas1'); | |
if ( !canvas || !canvas.getContext ) { return false; } | |
var w = canvas.width; | |
var h = canvas.height; | |
var ctx = canvas.getContext('2d'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//[How do you Invert signed numbers? | Oracle Community](https://community.oracle.com/thread/1253898) | |
public class InvertSignedNumbersTest { | |
private static void print(int i) { | |
System.out.println(i); | |
System.out.format(" :%d\n", (~i+1)); | |
System.out.format(" :%d\n", (i>0?-1:1)*Math.abs(i)); | |
System.out.format(" :%d\n", (~--i)); | |
} | |
public static void main(String[] args) { | |
print(256); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="2.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns="http://www.w3.org/1999/xhtml"> | |
<xsl:template match="/"> | |
<html> | |
<style TYPE="text/css"> | |
body{margin-left:1em} | |
.listbody{margin-left:1em} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//package example; | |
//-*- mode:java; encoding:utf-8 -*- | |
// vim:set fileencoding=utf-8: | |
// http://ateraimemo.com/Swing/FontSilhouette.html | |
// http://stackoverflow.com/questions/18686199/fill-unicode-characters-in-labels | |
// http://blog.livedoor.jp/kinisoku/archives/4204798.html | |
import java.awt.*; | |
import java.awt.font.*; | |
import java.awt.geom.*; | |
import java.io.Serializable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.time.*; | |
import java.time.temporal.*; | |
public class DurationFormatTest { | |
public static void main(String... args) throws Exception { | |
for (int i = 0; i < 10; i++) { | |
long startTime = System.nanoTime(); | |
Thread.sleep(1000, 888888); | |
long endTime = System.nanoTime(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//package example; | |
//-*- mode:java; encoding:utf-8 -*- | |
// vim:set fileencoding=utf-8: | |
//@homepage@ | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.beans.*; | |
import java.io.*; | |
import java.util.List; | |
import javax.swing.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//package example; | |
//-*- mode:java; encoding:utf-8 -*- | |
// vim:set fileencoding=utf-8: | |
//http://java-swing-tips.blogspot.jp/2012/02/jcheckbox-node-jtree.html | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.util.*; | |
import javax.swing.*; | |
import javax.swing.event.*; | |
import javax.swing.tree.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.event.*; | |
import java.beans.PropertyChangeEvent; | |
import javax.swing.*; | |
import javax.swing.plaf.LayerUI; | |
class DragScrollLayerTest { | |
public JComponent makeUI() { | |
JTabbedPane tab1 = new JTabbedPane(); | |
tab1.addTab("aaa", new JLabel("11111111111")); |
OlderNewer