Applet Re-paint Error
I have a very large Applet, with a close button on it,
the functionality of the close button is:
this.stop(); //Just containing super.stop();
this.destroy(); //Just containing super.destroy();
this.getAppletContext().showDocument(new URL("http://localhost:8080/imap/servlet/ControllerServlet/servlet/SpatialServlet/CloseHome
This closes the Applet fine, however on loading the Applet for the second time,
I have to manually drag the mouse over each component to make it visable.
(Some error is throw in a Table Model I have)
Any ideas ?
First of all, don't call the applet's stop and destroy methods which are reserved for the browser or the appletviewer to call. Second, the probably reason why your applet doesn't display correctly is probably because your applet init method doesn't include a call to make it visible. Depending on how you code your applet, you can try the followings:
pack(); // only if a frame is involved
show();
setVisible(true);
validate();
etc.
V.V.
Similar Messages
-
Start:applet not initilaized error
Hi friends,
I'm getting Start:applet not initilaized error when i'm running a program...
saved a notepad file as Testloan.java used javac Testloan.java and appletviewer Testloan.java to execute the applet here is my code...
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;
<html>
<applet code="Testloan.class" width=300 height=100>
</applet>
</html>
public class Testloan extends Applet implements ActionListener
TextField t1,t2,t3;
Label lp,lr,lmp;
Button b1,b2;
public void init()
lp=new Label("Principal");
lr=new Label("Rate");
lmp=new Label("Payment");
add(lp);
add(lr);
add(lmp);
t1=new TextField();
add(t1);
t2=new TextField();
add(t2);
t3=new TextField();
add(t3);
b1=new Button("submit");
add(b1);
b1=new Button("Exit");
add(b2);
b1.addActionListener(this);
b2.addActionListener(this);
public void start() {
//win.setVisible(true);
public void stop() {
//win.setVisible(false);
public static int months(int principal,double rate,int payment)
Testloan tl=new Testloan();
principal=Integer.parseInt(tl.t1.getText());
rate=Double.parseDouble(tl.t2.getText());
payment=Integer.parseInt(tl.t3.getText());
int p=principal;
double eRate = rate / 1200.0;
int month =0,np=1;
while(np>0)
month = month + 1;
np= (int) (p*(1+eRate)-payment );
System.out.println(np+"/n");
p = np;
return month;
public void actionPerformed(ActionEvent e)
String cmd = e.getActionCommand();
}First, the code you posted was mangled by the forum formatting software. When you post code, select it and click the CODE button above the typing area, which will prevent that, and maintain your formatting.
When you ran the appletviewer program from the cmd window, error information was posted to it by the java command. Did you look at it? It says that you have a NullPointerException at this line
add(b2);because there's a typo in this line
b1 = new Button("Exit");which should have assigned a value to b2, not b1
Read and understand the error messages that java creates, they almost always point exactly at the problem and allow you to debug the cause. -
I have gotten a couple of paint errors in BasicTreeUI, one is an internal error, incorrect component. However, at the moment I have a different error, I am getting a NullPointerException in BasicTreeUI. Here is some sample code that causes the error, can anyone tell me what I am doing wrong and how to fix it?
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.tree.DefaultMutableTreeNode;
public class JTreePaintErrorDemo
public static void main(String[] args)
new JTreePaintErrorDemo();
private JTreePaintErrorDemo()
JTreeWindow jTreeWindow = new JTreeWindow();
jTreeWindow.setBounds(0, 0, 770, 540);
jTreeWindow.setLookAndFeel();
jTreeWindow.show();
private class JTreeWindow extends JFrame
private DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
private JTree tree = new JTree(root);
private JScrollPane treePane = new JScrollPane(this.tree);
public JTreeWindow()
super("JTreePaintErrorDemo");
super.getContentPane().add(treePane, BorderLayout.CENTER);
public void setLookAndFeel()
try
// get system look and feel
String windowLook = UIManager.getSystemLookAndFeelClassName();
// set system look and feel to window
UIManager.setLookAndFeel(windowLook);
// update window look and feel
SwingUtilities.updateComponentTreeUI(this);
catch (Exception exception)
// unable to load look and feel, no need to alert anyone, just
// continue with default look and feel
public void show()
this.tree.updateUI();
super.show();
this.root.add(new DefaultMutableTreeNode("Child"));
// reload tree after adding item
this.tree.updateUI();
}I am running this on a Windows XP, so it is using the WindowsTreeUI, which extends the BasicTreeUI. Here is the stack trace:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicTreeUI.java:1375)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1171)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
at javax.swing.JComponent.paintComponent(JComponent.java:541)
at javax.swing.JComponent.paint(JComponent.java:808)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4795)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4748)
at javax.swing.JComponent._paintImmediately(JComponent.java:4692)
at javax.swing.JComponent.paintImmediately(JComponent.java:4495)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
The error is occurring at the tree.updateUI() line. -
Admin Console Applet Login Connection Error
Hello,
I have done some Corba programming before and now I want to do more
serious work on Tuxedo. So I wish you will bear with my simple questions.
- I have brought up Tuxwsvr and wlisten (no errors) and listner is
running on port 3050 (windows platform)
- Now I open the web admin page and insert my login/pass (I have
controled it in the "tlisten.pw" file and its correct.
- The applet issues the error : "Connection Failed"
I appreciate if someone can help or forward me to an FAQ if this is a
frequently asked question.
Regards,
MacMac,
This error usually indicates tuxwsvr can not connect to the wlisten. So you
need to make sure wlisten started correctly.
The default port for "tlisten" is 3050, if you specify it to wlisten in the
%TUXDIR%\udataobj\webgui\webgui.ini, then wlisten can not bind to the same
port.
So I would suggest configure another port and have a try.
Regards,
Wayne
"news.bea.com" <[email protected]> wrote in message
news:[email protected]..
Hello,
I have done some Corba programming before and now I want to do more
serious work on Tuxedo. So I wish you will bear with my simple questions.
- I have brought up Tuxwsvr and wlisten (no errors) and listner is
running on port 3050 (windows platform)
w
- Now I open the web admin page and insert my login/pass (I have
controled it in the "tlisten.pw" file and its correct.
- The applet issues the error : "Connection Failed"
I appreciate if someone can help or forward me to an FAQ if this is a
frequently asked question.
Regards,
Mac -
Painting Error while displaying Waveform charts in subpanel
Hello:
I've been using subpanels for a while without problems. Recently I've
noticed a painting error when I load a VI containing a Waveform Chart
into the subpanel. The label of the Y Scale of the waveform chart
doesn't show, instead a black rectangle appears. This problem can be
seen in the VI viewer.vi, in the subpanel examples of LabVIEW. I know
this is not a big problem, but I'd like to know if there's a way to
correct it.
Thanks in advance.
Robst
Robst - CLD
Using LabVIEW since version 7.0Hi Robst,
This is a known issue with LabVIEW 7.x. Happily, it has been corrected in LabVIEW 8.0. There is a "quick and dirty" workaround (courtesy of Marc A http://forums.ni.com/ni/board/message?board.id=170&message.id=155006&requireLogin=False) that I hope you will find satisfactory. The background of the Y axis label is clear by default. If you manually change it to the color of the graph, then when you view it in a subpanel it will not turn black.
I hope this helps! Let us know if you have any further questions!
Megan B.
Applications Engineer
National Instruments -
SIMPLE APPLET GETTING RUNTIME ERRORS
I can figure out why this applet will not work, here is the code:
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
public class Convert extends Applet {
JTextField tCentigrade = new JTextField();
JLabel lCentigrade = new JLabel();
JLabel lEqual = new JLabel();
String Fahrenheit;
//Construct the applet
public Convert() {
tCentigrade.setText("45");
//Component initialization
private void jbInit() throws Exception {
this.setLayout(null);
tCentigrade.setText("");
tCentigrade.setBounds(new Rectangle(94, 135, 56, 24));
tCentigrade.addActionListener(new Convert_tCentigrade_actionAdapter(this));
lCentigrade.setFont(new java.awt.Font("Serif", 0, 16));
lCentigrade.setText("Centigrade");
lCentigrade.setBounds(new Rectangle(22, 130, 71, 32));
this.setVisible(true);
lEqual.setFont(new java.awt.Font("Serif", 0, 24));
lEqual.setText("=");
lEqual.setBounds(new Rectangle(171, 139, 34, 15));
this.add(lCentigrade, null);
this.add(tCentigrade, null);
this.add(lEqual, null);
void tCentigrade_actionPerformed(ActionEvent e) {
double F;
double C = Double.parseDouble(tCentigrade.getText());
F = ((9/5) * C) + 32;
Fahrenheit = Double.toString(F);
public void paint(Graphics g)
g.drawString(Fahrenheit,50,50);
class Convert_tCentigrade_actionAdapter implements java.awt.event.ActionListener {
Convert adaptee;
Convert_tCentigrade_actionAdapter(Convert adaptee) {
this.adaptee = adaptee;
public void actionPerformed(ActionEvent e) {
adaptee.tCentigrade_actionPerformed(e);
}the error message, if anyone wants to know, was:
java.lang.NullPointerException: string is null
at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2584)
at Convert.paint(Convert.java:51)
at sun.awt.RepaintArea.paint(RepaintArea.java:177)
at sun.awt.motif.MComponentPeer.handleEvent(MComponentPeer.java:374)
at java.awt.Component.dispatchEventImpl(Component.java:3658)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3439)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at jva.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
you get it because the string you try to draw at Convert.paint(Convert.java:51) is null. -
hi,
I am writing a image animation applet. I have written some of it and is just testing it. I got the following error: Method drawImage (java.awt.Image,int,int) not found in class java.awt.Graphics
Below is the code: you will find the paint method at the end of the program.
Thanks in advance
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
public class dance extends Applet implements Runnable {
Image pic[] = new Image[2];
int current = 0;
int x = 10;
int y = 10;
public void init() {
setBackground (Color.blue);
public void start () {
String picsrc[] = { "emty.gif","m.gif","ma.gif","mat.gif","matx.gif" };
Toolkit kit = Toolkit.getDefaultToolkit();
for (int i=0; i < pic.length; i++) {
pic[i] = kit.getImage(picsrc);
Thread th = new Thread (this);
th.start ();
public void stop() {
public void destroy() {
public void run () {
while (true) {
showtxt(0,3);
//writetxt();
//flashtxt(3);
public void showtxt (int start, int end) {
int showpic = 0;
for (int i = start; i < end; i +=1) {
current = showpic;
repaint();
pause(1000);
public void pause(int time) {
try {
Thread.sleep(time);
} catch (InterruptedException e) {}
public void paint (Graphics g) {
Graphics g2D = (Graphics2D) g;
if (pic[current] != null){
g.setColor(Color.white);
g.fillRect(10,10,60,60);
g.drawImage(pic[current],x,y);closest one to your method would be:
http://java.sun.com/j2se/1.4.1/docs/api/java/awt/Graphics.html#drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
but no version with only one image and two ints...
you would need to add to that call a imageobserver, and it should work -
Hi,
I am trying to record automation functional test script on Oracle Forms 11g using OpenScript.
Able to open the browser, but after accessing application URL, getting application error as "Bad Applet class name"
Java Plug-in 10.17.2.02
Using JRE version 1.7.0_17-b02 Java HotSpot(TM) Client VM
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
SSV dialog is suppressed........
cracked oracle.forms.engine.Main
Loading cached Forms Jars ...
Is this version (Oracle forms 11g, JRE 1.7.0_17) supported by OATS-OpenScript ?
Please advise if there is any work around here.
Thanks.From the last OATS release notes available in the C:\OracleATS\docs directory:
4.1 Oracle Functional Testing/OpenScript
Oracle Functional Testing’s OpenScript scripting platform has the following system
requirements:
■ Operating System (32-bit and 64-bit versions): Windows XP, Windows Vista,
Windows 2003, Windows 7, Windows 2008, Windows 2008 R2.
■ Memory: Minimum 1 GB
■ System: x86, 32-bit or 64-bit processor, 2.6 GHz or faster
■ Disk Space: 4 GB minimum
■ Browser: Internet Explorer 7.x, 8.x., 9.x; Firefox 3.5/3.6, 6.x, 10; Chrome 27+
(playback only).
■ Java Runtime Environment: JRE 1.6 minimum (up to build 38), JRE 1.7 (up to build
11) .
So basically, it's not supported... Can you try with another JRE version?
As always don't forget to run OpenScript as administrator on W7/8 or equivalent
JB -
I'm crazy!Applet and JNA Error:Library 'jnidispatch' was not found!
Hi all,
sorry to bother you, I really have no idea how to do JNA and Applet. I'm hardly mazy, man.
Every time it will throw an error to me :
Exception in thread "thread applet-JNAApplet-1" java.lang.UnsatisfiedLinkError: Library 'jnidispatch' was not found by class loader sun.plugin2.applet.JNLP2ClassLoader@291aff
at com.sun.jna.Native.getWebStartLibraryPath(Native.java:858)
at com.sun.jna.NativeLibrary.<clinit>(NativeLibrary.java:576)
at com.sun.jna.Library$Handler.<init>(Library.java:140)
at com.sun.jna.Native.loadLibrary(Native.java:372)
at com.sun.jna.Native.loadLibrary(Native.java:357)
at JNAApplet.init(JNAApplet.java:15)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)My program is so easy, I just want use Applet to revoke JNA and use the JNA to load a native lib.
here is the structure of my program:
Applet code :
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JPanel;
import com.sun.jna.Native;
public class JNAApplet extends JApplet {
public static Kernel32 kernel32 = null;
@Override
public void init() {
createGUI();
kernel32 = (Kernel32)Native.loadLibrary("Kernel32", Kernel32.class);
if (kernel32 == null) {
System.out.println("load kernel32 fail!");
} else {
System.out.println("load kernel32 success!");
private void createGUI() {
JPanel panelCenter = new JPanel();
JButton butTest = new JButton("Test");
panelCenter.add(butTest);
setContentPane(panelCenter);
}When I run it on debug mode, it is ok! but when I deploy it , it will throw above error message to me.
My Applet html:
<html>
<head>
<title>JNA Applet</title>
</head>
<body>
<script src="deployJava.js"></script>
<script>
var attributes = { code:'JNAApplet', width:300, height:300} ;
var parameters = {jnlp_href: 'JNAApplet.jnlp'} ;
deployJava.runApplet(attributes, parameters, '1.5');
</script>
</body>
</html>File 'JNAApplet.jnlp':
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="">
<information>
<title>JNA Applet</title>
<vendor>Steven</vendor>
</information>
<resources>
<j2se version="1.5+"
href="http://java.sun.com/products/autodl/j2se" />
<jar href="JNAApplet.jar" main="true" />
</resources>
<applet-desc
name="JNA Applet"
main-class="JNAApplet"
width="300"
height="300">
</applet-desc>
<update check="background"/>
</jnlp> I really have no idea. and I can't search any usefull infomation from Google and officer site.
Can any one help me? Thank you very much!!!!Hi AndrewThompson64:
Did you mean the JNA project? Or are you refering to JNI, or ..something else?Yes, I mean is that I wanna jna.jar to replace JNI to code with Applet. I want Applet can run native library(.dll files).
That reads like so much nonsense to me.Sorry fo that.
Was there any 'caused by' part that you trimmed? I expected to see something to do with 'Security' or 'AccessControl'.Sorry, I can't saw any 'cause by' subsentence there. This message is just gain from Applet Console.(Is there any method to gain more message?)
About 'Security' and 'AccessControl' I just modify my java.policy file to allpermission. Subsequently, I signed all jar files.
For now I have 3 jar files(all have been signed ):
--example.jar : for this little program.(code include applet and application entry)
--jna.jar
--win32-x86.jar : include kernel32.dll and jnidispatch.dll for win32 and x86.
and 2 JNLP files:
--JNAApplet.jnlp the entry is JNAApplet.class (this jnlp does not work)
--JNAApp.jnlp the entry is JNAApp.class (this jnlp works)
And for now new error message show like this:
Exception in thread "thread applet-JNAApplet-1" java.lang.UnsatisfiedLinkError: Library 'Kernel32' was not found by class loader sun.plugin2.applet.JNLP2ClassLoader@4aeb52
at com.sun.jna.Native.getWebStartLibraryPath(Native.java:858)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:97)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:228)
at com.sun.jna.Library$Handler.<init>(Library.java:140)
at com.sun.jna.Native.loadLibrary(Native.java:372)
at com.sun.jna.Native.loadLibrary(Native.java:357)
at JNAApplet.init(JNAApplet.java:12)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Did you mean invoke?
Revoke: To annul by withdrawing.
Invoke: To call on.Yes, you got it. Thank you.
The JNLP file is invalid. ..I was about to put my 'standard' text here, but I'm sick of saying it. Search the forum for my posts - 50% of them, at least, mention validation and how to go about it.
Also, the applet-desc requires a documentbase.Thank you, I really think I have some invalid section. But I can't find it, and you said 'Search the forum for my posts - 50% of them...' , I can read the JNLP structure on site of sun and I can to read you post too(I'm doing like this).*I only want to know about how to load "native lib like *.dll" properly*.
What 'officer site'?I mean jna project site. Sorry for ambiguity.
Please fix that sticky '!' key. One '!' indicates astonishment, while two or more typically indicates a bozo. Thanks for your advice. Because I tried to find solution do my best lasting two days. I got nothing. I'm sadness.
here post my new files:
import javax.swing.JFrame;
import com.sun.jna.Native;
public class JNAApp {
public static Kernel32 kernel32 = null;
public static void main(String[] args) {
// TODO Auto-generated method stub
kernel32 = (Kernel32)Native.loadLibrary("Kernel32", Kernel32.class);
JFrame frame = new JFrame();
frame.setSize(500, 500);
frame.setVisible(true);
import javax.swing.JApplet;
import javax.swing.JButton;
import javax.swing.JPanel;
import com.sun.jna.Native;
public class JNAApplet extends JApplet {
public static Kernel32 kernel32 = null;
public void init() {
createGUI();
kernel32 = (Kernel32)Native.loadLibrary("Kernel32", Kernel32.class);
private void createGUI() {
JPanel panelCenter = new JPanel();
JButton butTest = new JButton("Test");
panelCenter.add(butTest);
setContentPane(panelCenter);
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="">
<information>
<title>JNA Applet</title>
<vendor>Steven</vendor>
</information>
<resources>
<j2se version="1.5+"
href="http://java.sun.com/products/autodl/j2se" />
<jar href="JNAApplet.jar" main="true"/>
<jar href="jna.jar"/>
</resources>
<resources os="Windows" arch="x86">
<nativelib href="win32-x86.jar"/>
<nativelib href="kernel32.jar"/>
</resources>
<applet-desc
documentBase=""
name = "success"
main-class="JNAApplet" width = "200" height = "200">
</applet-desc>
<update check="background"/>
<security>
<all-permissions/>
</security>
</jnlp>
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="">
<information>
<title>JNA Applet</title>
<vendor>Steven</vendor>
</information>
<resources>
<j2se version="1.5+"
href="http://java.sun.com/products/autodl/j2se" />
<jar href="JNAApplet.jar" main="true"/>
<jar href="jna.jar"/>
</resources>
<resources os="Windows" arch="x86">
<nativelib href="win32-x86.jar"/>
<nativelib href="kernel32.jar"/>
</resources>
<application-desc
main-class="JNAApp">
</application-desc>
<update check="background"/>
<security>
<all-permissions/>
</security>
</jnlp> Thanks & Best Regards,
Su Heng -
Hi Everyone,
I am creating a report for profit centers Actual/Plans and YTD .I am using lreport painter and library 0FL which uses table FAGLFLEXT.I defined some revenue accounts and got the following warning message. When I was creating rows and updating cost elements with account numbers.I set up 3 revenue accounts and then ran the report to see if I get any data for profit centers.I did get data but when I double clicked on one of the account,it displays this messsage.I read the msg. but could not make any sense with it.for example in definning row I put account number from/to 400000- 400000 Explode. and thats a characteristic.
No valid master data for characteristic 'Account Number'
Report MEG1 does not contain any data pages.
No valid master data for characteristic 'Account Number'
Message no. GR633
Diagnosis
No valid master data within the specified interval was found for the characteristic 'Account Number'.
Explanation:
For each characteristic that is processed in a report, the Report Writer optimizes the interval limits which are relevant for selecting data from the database.
Example:
A report contains the characteristic 'account', for which an account interval from 100000 to 200000 has been entered. However, if the master data validation shows that the lowest/highest account in this interval is 110000/190000, the selection will be limited to accounts 110000 to 190000 only.
The system returns this error message if no master data exists for the interval.
This error is typically caused by an invalid version. In FI-SL Special Purpose Ledger, for example, versions are assigned to the ledger and are defined in configuration. The report definition can then contain a non-defined version. A similar situation applies to controlling (cost center accounting): here, versions are assigned to the controlling area and fiscal year and can be defined in planning.
Another cause of this error is a ledger that is not assigned to the table for which the report was created.
Technical information:
The field name for 'Account Number' is 'RACCT'.
System Response
The system cancels processing.
Procedure
Check the report definition, or the specified master data, or the intervals.HI Abhijit,
I check the master data for cost element ,its there with cost element category 11. I also checked the library for field RACCT Account number,its also defined properly.Is that may be related wit version or number interval?? Please suggest.
Regards
Shaun -
Plz, tell me How can i solve the -- start:applet not initilized error..
Here is my code
* Sigmoid Function Generator
* @author
* @version
*<applet code="Sigmoid" width=500 height=500></applet>
import java.awt.*;
public class Sigmoid extends java.applet.Applet implements Runnable
private static final long serialVersionUID = 5622349801036468572L;
boolean finished = false; //indicates when the curve has been completed
double k = .025; //non-linearity constant
double y = k / 4; //output value
double x = 0; //input value
double dx = k / 10; //plotting (or look-up table) increment
int s = 200; //pixels per unit real (scaling factor)
int H = 0, V = s - 1; //window co-ordinate of graphical origin
int X, Y; //dimensions (in pixels) of the applet window
Image I = null; //reference for an off-screen image I
Graphics i = null; //graphics context for the off-screen image
long TF = 50; //total Time Frame for plotting update cycle
long T; //time at which the next new cycle is due to begin
Thread plotting; //declare a thread reference variable
Font font; //and a font reference for annotations
Color tr; //trace colour
boolean TypeFlag = false; //set for unipolar presentation
public void init()
{ //INITIALISE THE APPLET
int Xy, Yx; //co-ords of axis labels
tr = new Color( 0, 128, 64); //create special dark green for trace
font = new Font("Dialog", Font.PLAIN, 12); //choose the lettering font for this applet
Dimension d = getSize(); // instead of size() use this method, get size of window as given in HTML applet tag
X = d.width; Y = d.height; //establish window width and height
I = createImage(X, Y); //create the off-screen image I
i = I.getGraphics(); //graphics context reference for off-screen image
if(getParameter("type").equals("bipolar"))
{ //if applet parameter 'type' = 'bipolar'
TypeFlag = true; //set the TypeFlag true;
k = .011; //non-linearity constant
y = 0; //output value
x = 0; //input value
dx = .0025; //plotting (or look-up table) increment
s = 100; //pixels per unit real (scaling factor)
H = 100; V = 100; //window co-ordinate of graphical origin
Xy = V + 10; Yx = H - 10; //co-ords of axis letters
else
{ //if doing a unipolar graph
Xy = V - 5; Yx = H + 5; //co-ords of axis letters
i.setColor(Color.lightGray); //set background colour for the off-screen image
i.fillRect(0, 0, X, Y); //paint background of off-screen image
i.setFont(font); //set up the annotation font
i.setColor(Color.gray); //set colour for drawing the graph axes
i.drawLine(0, V, X, V); //draw x axis
i.drawLine(H, 0, H, Y); //draw y axis
i.setColor(Color.black); //set colour for lettering
i.drawString("X", X - 10, Xy);
i.drawString("Y", Yx, 10); //print the X and Y axis letters
i.setColor(tr); //set colour to paint the trace on image
T = System.currentTimeMillis() + TF; //set end time for current update time frame
public void paint(Graphics g)
{ //set up the graphics
g.drawImage(I, 0, 0, null); //(re)draw from the off-screen image I
public void update(Graphics g)
{ //PLOT THE SIGMOID GRAPH
if(x > 1 || y > 1) //if plot has reached edge of graph
finished = true; //set the 'finished' flag
else { //if not yet finished plotting graph
int h = (int)(s * x); //convert horizontal plot to pixels
int v = (int)(s * y); //convert vertical plot to pixels
g.setColor(tr); //set colour to paint the trace on screen
int a = h, b, c = V - v, d; //simplify pixel co-ordinates
if(TypeFlag)
a = H - h; b = H + h; //simplify pixel co-ordinates
c = V + v; d = V - v;
g.drawLine(b, d, b, d); //do next plot in lower left quadrant
i.drawLine(b, d, b, d); //do next plot in lower left quadrant
y += k * (1 - y); //advance the output difference equation
} else
y += k * y * (1 - y); //advance the output difference equation
x += dx; //advance the input value
g.drawLine(a, c, a, c); //do next plot in upper right quadrant
i.drawLine(a, c, a, c); //do next plot in upper right quadrant
public void run() { //run the plotting thread
while(true) { //permanent loop broken by external event
if(!finished) repaint(); //if not yet finished, do next plot
long s = T - System.currentTimeMillis(); //get time remaining in this cycle's time frame
if (s < 5) s = 5; //in case host PC is too slow for ideal trace speed
try {
Thread.currentThread().sleep(s); //sleep for remaining time
catch (InterruptedException e)
System.out.println(e);
//allow browser events to break the thread
} //happens if you return to applet's HTML page
T = System.currentTimeMillis() + TF; //set finish time of next time frame
public void start() { //Start program thread by
plotting = new Thread(this); //creating the thread object
plotting.start(); //and starting it running
} //[returns a call to run()]
// public void stop() {plotting.stop();} //Stop program thread
private volatile Thread blinker;
public void stop() { // new method to stop thread
blinker = null;Hi there Abdullah ch,
You may find the information in the article below helpful.
iOS: Understanding Restrictions (parental controls)
Important: If you lose or forget your Restrictions passcode, you'll need to perform a factory restore to remove it.
-Griff W. -
Hi friends,
I am trying to load this "Screen Painter Layout" thingy from se80 but I always seem to have an error loading the graphical mode and brings me to the alphanumeric mode.
The error message goes something like " gnetx.exe : No response from Graphic screen painting - Exiting "
Any one has any idea why its doing this? Thanks in advance
Regards,
r3venantIt should be ur GUI problem.
Ask ur admin guy to reinstall and the first aid is to relogin by closing all the sessions and try again.
Regards
Gopi -
Report Painter: Error RG102 when executing report
Hi All!
I need help with an error I'm facing with Report Painter...
When executing a report with a large amount of variables and columns I'm receiving the error:
Message no. RG102: Syntax error in GP3NDZHLG3MURI7VJEVF29KI876800, row 0
If in the General Data Selection instead of using a Variable for the Version I use a fix value, it works OK. However, other reports are working properly with the same Gen. Data Selection.
Does anyone has an idea of the cause of this report?
Thanks!Hi All,
I will try to clarify a little bit on my Issue.
First of all, it's not a BW issue, but a Reporting Problem with the Report Painter for the Consolidation (EC-CS).
The row is configured with a Set of Data regarding a Consolidation Item that includes all the P&L Accounts. It is configured to 'Expand'.
Regarding the columns, I have a large number, between 40 and 50 mixing Ratio with Characteristics and Formulas. Within them, I'm using as well variables for Period, Consolidation Unit and so on.
In the Selection Screen I have configured the following paramters
Version - 100
Dimension - T1
Cons chart/acct - C1
Ledger - US
Cons group (Set and Variable) ZSETUNV
Year for CG breakdwn (Variable) ZEJERAM
Period for CG breajdw (Variable) ZPERAM
With all the above-mentioned configurations the report works great. However, if in the Selecion Parameteres I try to replace the Version (Instead of having fix value 100, to have a variable ZVER) in order to deal with several versions in the same report when I save and execute I receive the posted error:
Message no. RG102: Syntax error in GP3NDZHLG3MURI7VJEVF29KI876800, row 0
Does anyone has an idea if there is a Maxium of Variables for Report Painter or any idea which may be the origin of this error?
Thanks again! -
KP06 excel upload, KP66 report painter error.
Hello everyone,
I am attempting to upload our budget planning into KP06 via the excel flexible upload function.
I have created a new user profile via KP34.
I have created a new layout via KP65.
I have saved the "Generic File" and the excel file created when assigning the layout to the planner profile in KP34.
I enetered the needed information into the excel spreadsheet created above, and saved it as a .txt file.
When I go in to KP06 and attempt to upload the .txt file through KP06, I am getting the following Message:
"The row inserted cannot be processed manually"
When I select this message for mare detail, here is what I see:
The row inserted cannot be processed manually
Message no. K9 072
Diagnosis
You have entered a new row.
The characteristic entered in the lead column or the combinations of characteristics entered in the lead columns cannot be processed manually.
System Response
The entered row is not accepted.
Procedure
Analyze the cause of the error in the corresponding transaction.
I believe that has to do something with the file format or how I setup the layout in KP65. However, I can figure out what the issue is.
I am very new to using SAP Report writer/painter.
Does anyone have any suggestions in resolving this issue?
Thanks in advance for your help,
RhondaHello,
Thank you for the replies. I did resolve the issue above (K9 072), the account group gave me a cost center and cost element that was blocked for use. Once I usees a valid cost center and cost element, the error went away.
We are using SAP version 4.6
With that said... I did receive another error, "Enter a numeric value"
Enter a numeric value
Message no. 00 052
The valid cost centers are alphanumeric, not just numeric. For instance: IT1 is a cost center.
Can alphanumeric values be used? If so, how to I go about making them work with the upload in KP06?
I have looked at the layout in report writer (KP66) and I see no options on allowing alphanumeric values. However, I am very new to this and just may be missing it.
Any suggestions would be greatly appreciated.
Thank you very much!
Rhonda -
Just got CS 6 (not extended) When I click Oil Paint Filter I get the following msg.
The filter you were using encountered an unknown graphics processor error that caused an unexpected exit. Check manufacturer for the latest software.
Is it my graphics card. If so, how do I check to see what I have? I have an HP about three years old.You need to upgrade your video driver from the web site of the manufacturer of your video card, not from HP, not from Microsoft, and not through Windows update.
Windows should tell you exactly what your video card is when you look at the computer properties. I'm a Mac user, so I can't give you more precise instructions.
Maybe you are looking for
-
ITunes freezing when trying to sync iPhone 5.
I'm at my tethers end. Last month I had my iPhone replaced at an Apple store, as the battery on my old phone was draining unusually fast (100% to 0% in 2 hours on standby with nothing open). This replaced iPhone has been slightly tempermental, but I
-
Hi all. My worker fail when run file cndictsys.ldt with developer Primary Key. apply patch 7303030 for upgrade EBS from 12.0.6 to 12.1.1. Uploading from the data file /u787/mangle/apps/apps_st/appl/cn/12.0.0/patch/115/import/US/cndictsys.ldt Altering
-
I only have 2 apps on my ipad bt it says I have used up 10 GB
I only have 2 apps on m ipad and everything in setting adds up to 3GB but on setting its says I have used up 10GB how do I get my storage back
-
Tiny iWeb slideshow in iWeb 08
Hello, I just upgraded to iWeb 08 and realized that the former slideshow function on photo pages (black background with reflection) now shows very small versions of my photos, more like thumbnails than the actual photos, and in any case much smaller
-
How long does it usually take to restore your Ipod?
I am restoring my Ipod, but the problem is that it has taken at least 30 minutes already and it is still not finished. I am using Windows 2000 and all other softwares are running well. How long is it supposed to take to restore your Ipod?