Page 1 of 1

Sample app for Teechart for Java is not getting compiled

Posted: Fri May 08, 2009 12:34 pm
by 8440512
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;
-----------------------------------------------------------------------

Posted: Fri May 08, 2009 1:21 pm
by narcis
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.

Posted: Sat May 09, 2009 8:30 am
by 8440512
Downloaded eval version just a week back.

Posted: Mon May 11, 2009 2:10 pm
by Marc
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

Posted: Tue May 12, 2009 4:21 am
by 8440512
Hello Marc,

Thanks for the reply. Code is working.

Best,
Veeranna Ronad.

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

Posted: Mon Feb 20, 2012 4:37 pm
by 10548077
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

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

Posted: Tue Feb 21, 2012 10:06 am
by yeray
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?