Sample app for Teechart for Java is not getting compiled

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
SDG
Newbie
Newbie
Posts: 40
Joined: Tue Apr 08, 2003 4:00 am

Sample app for Teechart for Java is not getting compiled

Post by SDG » Fri May 08, 2009 12:34 pm

Hello,

I am writing a sample application to test TeeChart for Java and getting following error while compiling demo Java file. Kindly advice me.
-----------------------------------------------------------------------
cannot access com.steema.teechart.drawing.ChartPen

bad class file: C:\PServer50\server\nodes\fdms_charts\archives\public_html\FDMS\TeeCharts\jars\TeeChart.Swing\com\steema\teechart\drawing\ChartPen.class

class file has wrong version 49.0, should be 48.0

Please remove or make sure it appears in the correct subdirectory of the classpath.

import com.steema.teechart.drawing.ChartPen;
-----------------------------------------------------------------------

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri May 08, 2009 1:21 pm

Hi D486909,

Which exact TeeChart for Java version are you using? Notice that on last 27th April we posted a new version at the client area.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

SDG
Newbie
Newbie
Posts: 40
Joined: Tue Apr 08, 2003 4:00 am

Post by SDG » Sat May 09, 2009 8:30 am

Downloaded eval version just a week back.

Marc
Site Admin
Site Admin
Posts: 1217
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Mon May 11, 2009 2:10 pm

Hello,

Please could you describe a little more about the project setup to help us reproduce the problem. We've been unable to generate the problem using the latest evaluation version and the following steps.

Steps taken:
- new netbeans desktop application
- added TeeChart to the palette and added to form
- added button with following code:

Code: Select all

tChart1.getSeries().add(new com.steema.teechart.styles.Line());
tChart1.getSeries(0).fillSampleValues();
tChart1.getAxes().getAxis(0).getAxisPen().setWidth(4);
tChart1.getAxes().getAxis(0).getAxisPen().setColor(java.awt.Color.yellow);
The code runs successfully, modifying the two Pen characteristics of the Axis.

Regards,
Marc Meumann
Steema Support

SDG
Newbie
Newbie
Posts: 40
Joined: Tue Apr 08, 2003 4:00 am

Post by SDG » Tue May 12, 2009 4:21 am

Hello Marc,

Thanks for the reply. Code is working.

Best,
Veeranna Ronad.

Wheb
Newbie
Newbie
Posts: 8
Joined: Fri Jan 25, 2008 12:00 am
Location: Brazil

Re: Sample app for Teechart for Java is not getting compiled

Post by Wheb » Mon Feb 20, 2012 4:37 pm

Hello,

I´m using the teechart component within my applications, and i´m experiencing some sort of problems. Maybe the problems are being
caused by my own applications, but the point is, when i choose to resize the application window, the border that i´ve draw on the
line with the command getOutLine().setVisible(true) increase it´s own size. I mean, i really have a default size for this border but when the window is resized, the border simply change it´s size.

Hope that you can help.

Regards,
Marcel

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Sample app for Teechart for Java is not getting compiled

Post by Yeray » Tue Feb 21, 2012 10:06 am

Hi Marcel,

I'm trying to reproduce it here with the following code in Eclipse, but the line looks the same size after resizing the window.

Code: Select all

import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

import com.steema.teechart.TChart;
import com.steema.teechart.misc.Utils;
import com.steema.teechart.styles.Line;

public class Test {

	static Display display;
	static Shell shell;
	static TChart tChart1;

	public static void main(String[] args) {
		display = new Display();
		shell = new Shell(display);
		shell.setLayout(new FillLayout());
		shell.setSize(800, 500);

		createChart();
		initializeChart();

		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		display.dispose();
	}

	private static void createChart() {
		tChart1 = new TChart(shell, 0);
	}

	private static void initializeChart() {
		tChart1.getAspect().setView3D(false);
		Line line1 = new Line(tChart1.getChart());
		line1.fillSampleValues();
		line1.getOutLine().setVisible(true);
		
		shell.addControlListener(new ControlListener() {
	           
            @Override
            public void controlResized(ControlEvent arg0) {
                tChart1.setBounds(Utils.fromLTRB(0, 0, shell.getSize().x, shell.getSize().y));
                tChart1.doInvalidate();
            }
           
            @Override
            public void controlMoved(ControlEvent arg0) {
            }
        });
	}
}
Could you please check the code above for you?
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply