HI, all!
I read the topic about HOW TO USE JFREECHART IN RCP posted here, but seems all solution is create one CLASS, including some static member and method(like createPieChart(){...}...), but when it comes to dynamic chart, these kind of solution will face a problem: SWTException: Invalid Thread Access, because a non UI thread cannot modify the UI component,
SO, here's the question, is there any approach or example to solve this problem, which enable us to display dynamic chart in RCP project...
JFreechart in RCP: dynamic chart problems
JFreechart in RCP: dynamic chart problems
P.R.China, now working with the Grid Project(http://www.crown.org.cn/en/).
use original jfreechart with SWT_AWT or experiment SWT jfreechart?
and if you use experiment SWT jfreechart then what is your eclipse version?
in general thread, for update swing graphics using
and for update SWT graphics using
and see this http://www.jfree.org/phpBB2/viewtopic.php?t=20736
I think it is same problem issue.
and if you use experiment SWT jfreechart then what is your eclipse version?
in general thread, for update swing graphics using
Code: Select all
SwingUtilities.invokeLater(new Runnable() {
public void run() {
add(item);
}
});
Code: Select all
Display.getCurrent().asyncExec(new Runnable(){
public void run(){
add(item);
}
});
I think it is same problem issue.
Tokdo belongs to Korea.
Not a 'sea of japan', But a 'East Sea(Dong hae)'
Not a 'sea of japan', But a 'East Sea(Dong hae)'
Thank you so much I'm using
experiment SWT. And my eclipse version is 3.2.2, I tried your code below
experiment SWT. And my eclipse version is 3.2.2, I tried your code below
and i still got NullPointerException...silent wrote:use original jfreechart with SWT_AWT or experiment SWT jfreechart?
and if you use experiment SWT jfreechart then what is your eclipse version?
and for update SWT graphics usingCode: Select all
Display.getCurrent().asyncExec(new Runnable(){ public void run(){ add(item); } });
Code: Select all
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at cn.org.crown.mymeter.charts.MemChart.addTotalObservation(MemChart.java:92)
at cn.org.crown.mymeter.model.DataGenerator.actionPerformed(DataGenerator.java:24)
at javax.swing.Timer.fireActionPerformed(Unknown Source)
at javax.swing.Timer$DoPostEvent.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
P.R.China, now working with the Grid Project(http://www.crown.org.cn/en/).
-
- Posts: 59
- Joined: Fri Oct 13, 2006 11:35 am
- Contact:
chart in eclipse rcp
Go thorugh the link u will know how to get the chart in eclipse rcp View
http://www.jfree.org/phpBB2/viewtopic.p ... hlight=swt
by
raghavan
http://www.jfree.org/phpBB2/viewtopic.p ... hlight=swt
by
raghavan