skip to main
|
skip to sidebar
deeply love program
2009年9月24日 星期四
set font for UI
ex:
Font font = label.getFont();
label.setFont(font.deriveFont(12f) );
label.setFont(font.deriveFont(font.getStyle() ^ Font.BOLD) );
UI alignment
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT,
LEFT_ALIGNMENT, RIGHT_ALIGNMENT
ex:
testLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
eclise problem in snow leopard when running java 1.6
error:
"java.lang.NoClassDefFoundError: apple/laf/CoreUIControl"
solution:
add /System/Library/Frameworks/JavaVM.framework/Versions/A/Frameworks/JavaRuntimeSupport.framework/Versions/A/Resources/Java/JavaRuntimeSupport.jar
to classpath of run configuration
enable root user in mac
open "Directory Utility"
click on Edit, click on "Enable root user"
2009年9月23日 星期三
java jtree
1. simple jtree example
public class SimpleTree extends JFrame {
public static void main(String[] args) {
new SimpleTree();
}
public SimpleTree() {
super("Creating a Simple JTree");
DefaultMutableTreeNode root = new DefaultMutableTreeNode("Root");
DefaultMutableTreeNode child1 = new DefaultMutableTreeNode("Child 1");
root.add(child1);
DefaultMutableTreeNode child2 = new DefaultMutableTreeNode("Child 2");
root.add(child2);
JTree tree = new JTree(root);
getContentPane().add(new JScrollPane(tree));
setSize(275, 300);
setVisible(true);
}
}
show directory size
du -h -d 1
-d means directory depth
install mac os from dmg file
need 2 partitions, one for installer, one will be where you install os
1. open disk utility
2. click restore tab
3. drag dmg file in source field
4. drag the partition for installer in destination field
5. click erase destination
6. click restore
7. open system preference --> startup disk --> installer partiton
8. restart to install os
較舊的文章
首頁
訂閱:
文章 (Atom)
標籤
book
(1)
cocoa
(1)
gcc
(1)
java
(9)
java swing
(3)
javascript
(2)
linux
(3)
linux command
(6)
linux driver
(1)
mac
(15)
mac driver
(1)
windows com
(6)
windows driver
(5)
追蹤者
網誌存檔
▼
2009
(40)
▼
9月
(39)
set font for UI
UI alignment
eclise problem in snow leopard when running java 1.6
enable root user in mac
java jtree
show directory size
install mac os from dmg file
cp
driver extension
call javascript function from html
regular expression
search rpm
tar
unpack an bz2 file
unpack an rpm
how to use a com object
Interface Definition Language (IDL)
Active Template Library (ATL)
HRESULT & com
GUID & com
com & interface
package windows driver
compile windows project
check out project(not created from xcode) from cvs...
call java from native program
pthread example
PackageMaker
create java app on mac
set working directory
man command
let java menu bar replace app menu bar
compile jni program on xcode
java location in mac
compile program with core foundation framework
show content of jar file
show file is 64 bit or 32 bits
create x86_64 & i386 binary on mac
compile JNI program on mac
java -cp
►
2月
(1)
關於我自己
彼得潘
App程式設計入門 iPhone . iPad 第二版 2012.2 App程式設計入門 iPhone . iPad 第一版 2010.11
檢視我的完整簡介