DIAVIS-wiki
 CONTENTS
 #contents
 
 ----
 *数値のフォーマット [#x0b22adc]
 package java.textのDecimalFormatクラスを利用する.
 
  long value = 140000000;
  DecimalFormat format = new DecimalFormat();
  String formattedValue = format.format( value );
 
 結果は,「140,000,000」となる.
 
 上記のほかにも,小数部/整数部の最大桁数/最小桁数の指定なども行える.
 
 -setMaximumFractionDigits(digit);
 -setMinimumIntegerDigits(digit); 
 など.
 
 *ファイルからのフォント取得 [#n4e033b1]
 : Java Technology Forums - Loading TYPE1 fonts with JRE 1.5.0 | http://forum.java.sun.com/thread.jspa?forumID=57&threadID=518768
 : Fontをファイルから取得 | http://terai.xrea.jp/Swing/CreateFont.html
 
 *アプリからブラウザ [#p6dde10e]
 :[JavaHouse-Brewers:12442] Re: JAVAアプリからブラウザを立ちあげる方法|http://java-house.jp/ml/archive/j-h-b/012442.html#body
 :外部アプリ起動がプチ簡単に ProcessBuilder|http://www.javainthebox.net/laboratory/J2SE1.5/TinyTips/ProcessBuilder/ProcessBuilder.html
 :Technical Q&A Java 12 - Runtime.exec を使って URL を開く(1999 年 6 月 2 日更新)|http://developer.apple.com/jp/qa/java/JAVA12.html
 
 *画像のファイルへの保存 [#h8ac38af]
  if(isScreenCapture){
 	String time; //for filename
 	time = "" + (calendar.get(Calendar.MONTH)+1)
 						+ calendar.get(Calendar.DATE)
 						+ calendar.get(Calendar.HOUR)
 						+ calendar.get(Calendar.MINUTE)
 						+ calendar.get(Calendar.SECOND);
 	try{
 		ImageIO.write(offscreen, "jpeg", new File("capture/sc" + time + ".jpeg"));
 	} catch (Exception write_error){
 		System.out.println("at ImageIO.write : " + write_error);
 	}
 }
  }
トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS