風(fēng)之語
posts(201)
comments(182)
trackbacks(1)
BlogJava
聯(lián)系
聚合
管理
常用鏈接
我的隨筆
我的評論
我的參與
最新評論
留言簿
給我留言
查看公開留言
查看私人留言
隨筆分類
ajax(1)
android(1)
apache(1)
AppFuse(1)
BIRT(1)
iText(1)
JSF(8)
kettle(1)
linux(5)
mac(1)
maven(1)
MSTR(3)
Open XML(1)
Oracle(21)
RCP
Struts(2)
Struts2(2)
SybaseIQ(6)
tapestry
tomcat(2)
weblogic(1)
webservice(1)
weka(1)
云計算(1)
收藏(31)
數(shù)據(jù)倉庫(11)
架構(gòu)設(shè)計(3)
生活(2)
集群(1)
項目管理(6)
隨筆檔案
2012年12月 (4)
2012年11月 (1)
2012年7月 (2)
2011年8月 (1)
2011年7月 (1)
2011年3月 (1)
2010年12月 (2)
2010年11月 (4)
2010年10月 (3)
2010年9月 (5)
2010年8月 (1)
2010年7月 (4)
2010年3月 (1)
2010年2月 (3)
2009年12月 (3)
2009年11月 (4)
2009年9月 (3)
2009年6月 (5)
2009年5月 (3)
2009年4月 (2)
2009年3月 (5)
2009年2月 (4)
2009年1月 (2)
2008年11月 (2)
2008年9月 (1)
2008年7月 (2)
2008年6月 (4)
2008年5月 (6)
2008年4月 (1)
2008年3月 (1)
2007年12月 (2)
2007年11月 (5)
2007年10月 (2)
2007年9月 (3)
2007年8月 (3)
2007年4月 (1)
2007年3月 (2)
2007年2月 (2)
2007年1月 (2)
2006年12月 (3)
2006年8月 (2)
2006年7月 (2)
2006年6月 (2)
2006年4月 (2)
2006年3月 (1)
2006年2月 (3)
2006年1月 (6)
2005年12月 (6)
2005年11月 (4)
2005年10月 (17)
2005年9月 (25)
2005年8月 (16)
2005年7月 (8)
相冊
技術(shù)圖片
收藏夾
java
link
My wife
My wife's blog
最新隨筆
1.?apache修改最大連接并用ab網(wǎng)站壓力測試
2.?Vm虛擬機訪問本地硬盤文件
3.?NFS文件無法寫入的權(quán)限問題
4.?weblogic設(shè)置上傳文件訪問權(quán)限
5.?在android上動態(tài)實現(xiàn)ichartjs的3D柱形圖
6.?使用Oracle trunc 來指定精確的年月日時分秒
7.?Quartz 2.1.5 web應(yīng)用配置
8.?LoginAny 使用筆記
9.?MyEclipse 無響應(yīng)的幾種解決辦法
10.?java.sql.SQLException: No more data to read from socket
搜索
積分與排名
積分 - 401965
排名 - 139
最新評論
1.?re: 使用Oracle trunc 來指定精確的年月日時分秒[未登錄]
政治
--張三
2.?re: 干掉流氓軟件vrvrf_c.exe,vrvedp_m.exe[未登錄]
`
--1
3.?re: 無需刻錄DMG光盤,教你在VMWare下安裝MAC OS X Snow Leopard 10.6
我走到了換DMG映像的時候,然后就沒有反應(yīng)了,這個是什么情況,是不是我的映像文件有問題,還是。。。。
--玉竹常青
4.?re: LoginAny 使用筆記
怎么沒一個人留言,現(xiàn)在來是不是在挖墳啊
--ellipse
5.?MSTR web應(yīng)用的部署[未登錄]
請問,如何用oracle Application Server服務(wù)器部署mstr web應(yīng)用?
--rocky
閱讀排行榜
評論排行榜
View Post
如何在Java中嵌入IE
package
com.bovy.office;
import
org.eclipse.swt.SWT;
import
org.eclipse.swt.layout.FillLayout;
import
org.eclipse.swt.ole.win32.OLE;
import
org.eclipse.swt.ole.win32.OleAutomation;
import
org.eclipse.swt.ole.win32.OleControlSite;
import
org.eclipse.swt.ole.win32.OleFrame;
import
org.eclipse.swt.ole.win32.Variant;
import
org.eclipse.swt.widgets.Display;
import
org.eclipse.swt.widgets.Menu;
import
org.eclipse.swt.widgets.Shell;
public
class
IETest
extends
Shell
...
{
/** */
/**
*/
/** */
/**
* Launch the application
*
*
@param
args
*/
public
static
void
main(String args[])
...
{
Display display
=
Display.getDefault();
IETest shell
=
new
IETest(display);
shell.setMaximized(
true
);
shell.setLayout(
new
FillLayout());
Menu bar
=
new
Menu(shell, SWT.BAR);
shell.setMenuBar(bar);
OleFrame frame
=
new
OleFrame(shell, SWT.NONE);
OleControlSite clientsite
=
null
;
OleAutomation browser
=
null
;
try
...
{
clientsite
=
new
OleControlSite(frame, SWT.NONE,
"
Shell.Explorer
"
);
browser
=
new
OleAutomation(clientsite);
clientsite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
shell.open();
int
[] browserIDs
=
browser.getIDsOfNames(
new
String[]
...
{
"
Navigate
"
,
"
URL
"
}
);
Variant[] address
=
new
Variant[]
...
{
new
Variant(
"
http://blog.csdn.net/bovy
"
) }
;
browser.invoke(browserIDs[
0
], address,
new
int
[]
...
{ browserIDs[
1
] }
);
}
catch
(Exception ex)
...
{
System.out.println(
"
Failed to create IE!
"
+
ex.getMessage());
return
;
}
while
(shell
!=
null
&&
!
shell.isDisposed())
...
{
if
(
!
display.readAndDispatch())
...
{
display.sleep();
}
}
browser.dispose();
display.dispose();
}
/** */
/**
*/
/** */
/**
* Create the shell
*
*
@param
display
*
@param
style
*/
public
IETest(Display display)
...
{
super
(display);
createContents();
}
/** */
/**
*/
/** */
/**
* Create contents of the window
*/
protected
void
createContents()
...
{
setText(
"
如何在Java中嵌入IE?http://blog.csdn.net/bovy
"
);
setMaximized(
true
);
//
}
@Override
protected
void
checkSubclass()
...
{
//
Disable the check that prevents subclassing of SWT components
}
}
posted on 2008-05-18 09:17
風(fēng)
閱讀(1389)
評論(0)
編輯
收藏
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發(fā)表評論。
網(wǎng)站導(dǎo)航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
Powered by:
BlogJava
Copyright © 風(fēng)
主站蜘蛛池模板:
乳山市
|
哈尔滨市
|
义马市
|
杂多县
|
凤城市
|
荆州市
|
彭山县
|
南木林县
|
汉寿县
|
佛教
|
永泰县
|
疏勒县
|
手游
|
杭州市
|
乐安县
|
镇康县
|
大宁县
|
新绛县
|
富阳市
|
南昌市
|
河源市
|
兴仁县
|
陵川县
|
汾阳市
|
龙陵县
|
金阳县
|
云南省
|
大连市
|
垣曲县
|
玉林市
|
泰安市
|
贞丰县
|
来安县
|
全椒县
|
永川市
|
高淳县
|
施秉县
|
荔波县
|
永宁县
|
绩溪县
|
浠水县
|