PIXNET Logo登入

阿勇的blog

跳到主文

歡迎光臨阿勇在痞客邦的小天地

部落格全站分類:不設分類

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 2月 20 週五 200910:47
  • java副檔名過濾器

import java.io.File;
import java.io.FileFilter;
public class ExtensionFileFilter implements FileFilter {
private String[] extension;
public ExtensionFileFilter(String[] s) {
extension=s;
}
public boolean accept(File file) {
if (file.isDirectory()) {
return false;
}
String name = file.getName();
// find the last
int index = name.lastIndexOf(".");
if (index == -1) {
return false;
} else if (index == name.length() - 1) {
return false;
} else{
for(int i=0;i<extension.length;i++){
boolean b=extension[i].equals(
name.substring(index + 1).toLowerCase());
if(b){
return true;
}
}
return false;
}
}
}
(繼續閱讀...)
文章標籤

阿勇 發表在 痞客邦 留言(0) 人氣(75)

  • 個人分類:java
▲top
  • 2月 20 週五 200910:37
  • 關於java中初始化界面中jProgressBar設計

//設定初使化的JFrame
frame = new InitFrame();
Thread thread = new Thread(new Runnable() {
public void run() {
//在這裡做設定主畫面的設定
for(){
frame.progress.setValue(i);
}
}
});
thread.start();
(繼續閱讀...)
文章標籤

阿勇 發表在 痞客邦 留言(0) 人氣(5)

  • 個人分類:java
▲top
  • 2月 20 週五 200910:35
  • JFrame置中

//要放在pack,setVisible之後。
frame.setLocationRelativeTo(null);
(繼續閱讀...)
文章標籤

阿勇 發表在 痞客邦 留言(0) 人氣(18)

  • 個人分類:java
▲top
1

個人資訊

阿勇
暱稱:
阿勇
分類:
不設分類
好友:
累積中
地區:

熱門文章

  • (177)利用freetype轉出bitmap點陣字
  • (23)在Qt中,使用系統預設的圖示
  • (19)在mac中,建立應用程式的圖示(icns)
  • (3)在SQL中,當二個鍵同時相等時,唯一鍵成立。

文章分類

  • 替代役的日子 (5)
  • 黑色鈣片 (4)
  • java (3)
  • picasa (1)
  • lua (1)
  • mingw (1)
  • nsis (1)
  • squirrel (1)
  • freetype (1)
  • bitmap font (7)
  • windows (5)
  • c (1)
  • NetBeans (2)
  • uml (1)
  • html5 (1)
  • Wheel Light (4)
  • Qt (26)
  • opengl (6)
  • chrome (2)
  • hg (2)
  • mac (4)
  • apns (1)
  • python (4)
  • php (2)
  • SQL (4)
  • iOS (3)
  • xcode (4)
  • Objective-C (8)
  • phonegap (1)
  • swift (1)
  • cordova (2)
  • 未分類文章 (1)

最新文章

  • Cordova速記
  • Cordova run simulation
  • swift速記
  • cordova發布到andriod
  • 迷香
  • notification results in “unrecognized selector sent to instance…”
  • 分開設定xcode的configureration
  • 關於doesNotRecognizeSelector引起的exception crash
  • 在SQL中,當二個鍵同時相等時,唯一鍵成立。
  • 防止繼承的delegate跟原本的衝突(how to extend a protocol for a delegate in objective C)

最新留言

  • [15/08/24] 阿勇 於文章「3D text on Qt with O...」留言:
    抱歉很久回這裡了,今天才看到你的留言 你說的很多錯誤,是指?...
  • [15/06/29] 匿名 於文章「3D text on Qt with O...」留言:
    阿勇大大你好, 請問一下這個範例是可以輸入文字後將他轉成3D...
  • [12/05/30] 匿名 於文章「利用freetype轉出bitmap點陣...」留言:
    mac os x 10.7.4 gcc -o ayong ...
  • [11/10/02] 匿名 於文章「安裝程式-nsis...」留言:
    請問 MUI 跟 MUIXP 以外的介面怎麼設定的ㄚ?...
  • [09/02/24] 阿勇 於文章「Script language~Lua和...」留言:
    最近看到一個squirrel http://squirrel...
  • [09/02/24] 阿勇 於文章「Script language~Lua和...」留言:
    Lua有點冷門,而且好像沒有oo的慨念。...
  • [09/02/15] Barros Lee 於文章「Script language~Lua和...」留言:
    我推 Lua...

動態訂閱

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣: