Please help with simple esle code
Hi all
Please can someone tell what I am doing Wrong with tis code.
I just can not see it
Please Help Me
Craig
void ShippAddressjCheckBox_actionPerformed(ActionEvent e) {
if (ShippAddressjCheckBox.setSelected(true ));
CopyAddress1();
else (ShippAddressjCheckBox.setSelected(false ));
ClearShippingAddress();
}
Thanks for that
this is what I have done
void ShippAddressjCheckBox_actionPerformed(ActionEvent e) {
if (ShippAddressjCheckBox.setSelected(true ))
CopyAddress1();
else if (ShippAddressjCheckBox.setSelected(false)) {
ClearShippingAddress();
I can seam to get it to work
Thanks
Similar Messages
-
Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work
You will need to contact the movie studio that produced the DVD and ask if they can issue you a new code valid for Canada. Apple cannot help you, and everyone here in these forums is just a fellow user.
Regards. -
Please help with simple Drag N Drop
I’m desperate and need some help with this simple drag
and drop. Here is the scenario…this animation is for a
kindergarten course. I have 6 different colored teddy bears on the
floor and the bears are to be placed on the middle shelf in the
room, in no particular order. I have the code in place to drag the
bears, and they return to their original location if dropped in the
wrong area. Everything works, except I can’t make the bears
stick to the target area. The target area has to be the same for
all 6 bears. Can someone help me out with this?
I have a feeling that the problem has something to do with my
instance names, but I have tried everything I can think of and
cannot get it to work. Is there some way I can post, send, or
attach my .fla file for someone to look at? I’m desperate.
PLEASE HELP!var startX3:Number;
var startY3:Number;
var counter3:Number=0;
vf_A.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
vf_A.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
vf_E.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
vf_E.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
vf_I.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
vf_I.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
vf_O.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
vf_O.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
vf_U.addEventListener(MouseEvent.MOUSE_DOWN, pickUp3);
vf_U.addEventListener(MouseEvent.MOUSE_UP, dropIt3);
function pickUp3(event:MouseEvent):void {
event.target.startDrag(true);
reply2_txt.text="";
event.target.parent.addChild(event.target);
startX2=event.target.x;
startY2=event.target.y;
function dropIt3(event:MouseEvent):void {
event.target.stopDrag();
var myTargetName:String="target"+event.target.name;
var myTarget:DisplayObject=getChildByName(myTargetName);
if (event.target.dropTarget != null &&
event.target.dropTarget.name == "instance112") {
reply2_txt.text="Good Job!";
event.target.removeEventListener(MouseEvent.MOUSE_DOWN,
pickUp3);
event.target.removeEventListener(MouseEvent.MOUSE_UP,
dropIt3);
event.target.buttonMode=false;
event.target.x=myTarget.x;
event.target.y=myTarget.y;
var mySound:Sound = new vowels_NAR_goodjob();
mySound.play();
counter3++;
} else {
reply2_txt.text="Try Again!";
event.target.x=startX2;
event.target.y=startY2;
var mySound2:Sound = new vowel_NAR_nopetryagain();
mySound2.play();
if (counter2==5) {
reply2_txt.text="Great Job! You did it!";
gotoAndPlay(3300);
vf_A.buttonMode=true;
vf_E.buttonMode=true;
vf_I.buttonMode=true;
vf_O.buttonMode=true;
vf_U.buttonMode=true; -
Need Help With Simple ABAP Code
Hello,
I'm loading data from a DSO (ZDTBMAJ) to an Infocube (ZCBRAD06). I need help with ABAP code to some of the logic in Start Routine. DSO has 2 fields: ZOCTDLINX & ZOCBRDMAJ.
1. Need to populate ZOCPRODCD & ZOCREFNUM fields in Infocube:
Logic:-
Lookup /BI0/PMATERIAL, if /BIC/ZOCBRDMAJ = /BIC/OIZOCBRDMAJ
then /BIC/ZOCPRODCD = ZOCPRODCD in Infocube
/BIC/ZOCREFNUM = ZOCREFNUM in Infocube
2. Need to populate 0G_CWWTER field in Infocube:
Logic:
Lookup /BIC/PZOCTDLINX, if /BIC/ZOCTDLINX = BIC/OIZOCTDLINX
then G_CWWTER = 0G_CWWTER in Infocube.
I would need to read single row at a time.
Thanks!I resolved it.
-
Please help with simple Classes understanding
Working further to understand Class formation, and basics.
At the Java Threads Tutorial site:
http://java.sun.com/docs/books/tutorial/essential/threads/timer.html
Goal:
1)To take the following code, and make it into 2 seperate files.
Reminder.java
RemindTask.java
2)Error Free
Here is the original, functioning code:
import java.util.Timer;
import java.util.TimerTask;
* Simple demo that uses java.util.Timer to schedule a task
* to execute once 5 seconds have passed.
* http://java.sun.com/docs/books/tutorial/essential/threads/timer.html
public class Reminder {
Timer timer;
public Reminder(int seconds) {
timer = new Timer();
timer.schedule(new RemindTask(), seconds*1000);
class RemindTask extends TimerTask {
public void run() {
System.out.println("Time's up!");
timer.cancel(); //Terminate the timer thread
public static void main(String args[]) {
new Reminder(5);
System.out.println("Task scheduled.");
}Here is what I tried to 2 so far, seperate into 2 seperate files:
Reminder.java
package threadspack; //added this
import java.util.Timer;
import java.util.TimerTask;
* Simple demo that uses java.util.Timer to schedule a task
* to execute once 5 seconds have passed.
* http://java.sun.com/docs/books/tutorial/essential/threads/timer.html
public class Reminder {
Timer timer;
public Reminder(int seconds) {
timer = new Timer();
timer.schedule(new RemindTask(), seconds*1000);
public static void main(String args[]) {
new Reminder(5);
System.out.println("Task scheduled.");
}and into
RemindTask.java
package threadspack; //added this
import java.util.Timer;
import java.util.TimerTask;
import threadspack.Reminder; //added this
* http://java.sun.com/docs/books/tutorial/essential/threads/timer.html
public class RemindTask extends TimerTask
Timer timer; /**here, I added this, because got a
"cannot resolve symbol" error if try to compile w/out it
but I thought using packages would have negated the need to do this....?*/
public void run() {
System.out.println("Time's up!");
timer.cancel(); //Terminate the timer thread
}After executing Reminder, the program does perform, even does the timing, however, a NullPointerException error is thrown in the RemindTask class because of this line:
timer.cancel(); //Terminate the timer thread
I am not sure of:
If I have packages/import statements setup correctly
If I have the "Timer" variable setup incorrectly/wrong spot.
...how to fix the problem(s)
Thank you!Hi there!
I understand that somehow the original "Timer" must
be referenced.
This is a major point of confusion for me....I
thought that when importing
Classes from the same package/other packages, you
would have directly
access to the variables within the imported Classes.I think you have one of the basic points of confussion. You are mixing up the concept of a "Class" with the concept of an "Object".
Now, first of all, you do not need packages at all for what you are trying to do, so my advice is you completely forget about packages for the moment, they will only mess you up more. Simply place both .class files (compiled .java files) in the same directory. Your program is executing fine, so that indicates that the directory in which you have your main class file is being included in your classpath, so the JVM will find any class file you place there.
As for Classes/Objects, think of the Class as the map in which the structure of a building is designed, and think of the Object as the building itself. Using the same technical map the architect defines, you could build as many buildings as you wanted. They could each have different colors, different types of doors, different window decorations, etc... but they would all have the same basic structure: the one defined in the technical map. So, the technical map is the Class, and each of the buildings is an object. In Java terminology, you would say that each of the buildings is an "Instance" of the Class.
Lets take a simpler example with a class representing icecreams. Imagine you code the following class:
public class Icecream{
String flavor;
boolean hasChocoChips;
}Ok, with this code, what you're doing is defining the "structure" of an icecream. You can see that we have two variables in our class: a String variable with the description of the icecream's flavor, and a boolean variable indicating whether or not the icecream has chocolate chips. However, with that code you are not actually CREATING those variables (that is, allocating memory space for that data). All you are doing is saying that EACH icecream which is created will have those two variables. As I mentioned before, in Java terminology, creating an icecream would be instantiating an Icrecream object from the Icecream class.
Ok, so lets make icrecream!!!
Ummm... Why would we want to make several icecreams? Well, lets assume we have an icecream store:
public class IcecreamStore{
}Now, we want to sell icecreams, so lets put icecreams in our icecream store:
public class IcecreamStore{
Icecream strawberryIcecream = new Icecream(); //This is an object, it's an instance of Class Icecream
Icecream lemonIcecream = new Icecream(); //This is another object, it's an instance of Class Icecream
}By creating the two Icecream objects you have actually created (allocated memory space) the String and boolean variable for EACH of those icecreams. So you have actually created two String variables and two boolean variables.
And how do we reference variables, objects, etc...?
Well, we're selling icecreams, so lets create an icecream salesman:
public class IcecreamSalesMan{
}Our icecream salesman wants to sell icecreams, so lets give him a store. Lets say that each icecream store can only hold 3 icecreams. We could then define the IcecreamStore class as follows:
public class IcecreamStore{
Icecream icecream1;
Icecream icecream2;
Icecream icecream3;
}Now lets modify our IcecreamSalesMan class to give the guy an icecream store:
public class IcecreamSalesMan{
IcecreamStore store = new IcecreamStore();
}Ok, so now we have within our IcecreamSalesMan class a variable, called "store" which is itself an object (an instance) of the calss IcecreamStore.
Now, as defined above, our IcecreamStore class will have three Icecream objects. Indirectly, our icecream salesman has now three icecreams, since he has an IcecreamStore object which in turn holds three Icecream objects.
On the other hand, our good old salesman wants the three icecreams in his store to be chocolate, strawberry, and orange flavored. And he wants the two first icecreams to have chocolate chips, but not the third one. Well, here's the whole thing in java language:
public class Icecream{ //define the Icecream class
String flavor;
boolean hasChocoChips;
public class IcecreamStore{ //define the IcecreamStore class
//Each icecream store will have three icecreams
Icecream icecream1 = new Icecream(); //Create an Icecream object
Icecream icecream2 = new Icecream(); //Create another Icecream object
Icecream icecream3 = new Icecream(); //Create another Icecream object
public class IcecreamSalesMan{ //this is our main (executable) class
IcecreamStore store; //Our class has a variable which is an IcecreamStore object
public void main(String args[]){
store = new IcecreamStore(); //Create the store object (which itself will have 3 Icecream objects)
/*Put the flavors and chocolate chips:*/
store.icecream1.flavor = "Chocolate"; //Variable "flavor" of variable "icecream1" of variable "store"
store.icecream2.flavor = "Strawberry"; //Variable "flavor" of variable "icecream2" of variable "store"
store.icecream3.flavor = "Orange";
store.icecream1.hasChocoChips = true;
store.icecream2.hasChocoChips = true;
store.icecream3.hasChocoChips = false;
}And, retaking your original question, each of these three classes (Icecream, IcecreamStore, and IcecreamSalesMan) could be in a different .java file, and the program would work just fine. No need for packages!
I'm sorry if you already knew all this and I just gave you a stupid lecture, but from your post I got the impression that you didn't have these concepts very clear. Otherwise, if you got the point, I'll let your extrapolate it to your own code. Should be a pice of cake! -
PLEASE HELP WITH SIMPLE RESET QUESTION!!!
This is probably extremely simple to resolve...my Nano is not syncing with my computer any more. I thought I should try resetting it. I looked at the manual and pressed MENU and the CENTRE BUTTON at the same time and waited for the Apple logo to appear. I tried several times but it did not work!
WHAT AM I DOING WRONG, PLEASE??When you restore the ipod, you need to press the menu and select (centre) button together for about 6 seconds. Try to be sure that your finger on the centre button does not touch the wheel part, and that the one on the menu button is closer to the outside edge.
This page has more information http://support.apple.com/kb/HT1320 -
i wanted to write a applet that would display a image,(this is my first program) i wrote the code shown below,but image space is emptly when i load it up with any browser.....i ran the code in netbeans,,, i am a novice, any piece of advice also wud be helpful.........
<applet code="imagereadingapplet" width=500 height=500>
<param name="img" value="kollam.gif">
</applet>
import java.applet.*;
import java.awt.*;
* @author raman
public class imagereadingapplet extends Applet {
* Initialization method that will be called after the applet is loaded
* into the browser.
Image img;
@Override
public void init() {
img = getImage(getDocumentBase(),"kollam.gif");
@Override
public void paint(Graphics g){
g.drawImage(img,0,0,this);
// TODO overwrite start(), stop() and destroy() methods
}Hi,
First advice imagereadingapplet -> ImageReadingApplet (Java name convention).
Second image file name is hard coded so you don't have to set param for the applet (Best would be not to hard code this name).
Finally maybe the most interesting, It seems that image kollam.gif is not at root folder.
I don't really know netbeans but your image must be in bin folder, the same as imagereadingapplet.class. -
Please help with this registration code issue!
Hi,
I just purchased Quicktime Pro, and am trying to use it. For some reason when I am working with a video, my registration code is always showing in the window under the video.
Why is this, and how can I remove it so that it doesn't constantly show?
Thanks!If you do post a pic, blur out or hide your registration number.
Never heard of your type of issue either. -
Please Help with Simple Conversion
I cannot figure out how to convert a String containing XML into a javax.xml.soap.SOAPElement. Could someone please advise?
Thank you in advance.* Get SOAPMessage object from an InputStream and closes this stream.
* @param soapStream InputStream with SOAP content.
* @return SOAPMessage or null if failed.
* @throws SOAPException
public static SOAPMessage getMessage(InputStream soapStream) throws SOAPException {
SOAPMessage result = null;
if (soapStream != null) {
StreamSource ss = null;
try {
SOAPMessage message = SOAPUtils.createMessage();
SOAPPart part = message.getSOAPPart();
ss = new StreamSource(soapStream);
part.setContent(ss);
result = message;
} finally {
try {soapStream.close(); } catch (IOException ioe) { ioe.printStackTrace(System.err); }
return result;
}//getMessage()
* Convert a SOAPMessage in string format to a SOAPMessage object.
* @param string String with SOAP content.
* @return SOAPMessage or null if failed.
* @throws Exception
public static SOAPMessage toMessage(String string) throws SOAPException {
SOAPMessage result = null;
if (string != null) {
result = getMessage(new ByteArrayInputStream(string.getBytes()));
return result;
}//toMessage() -
Help With Simple Encryption Code
I'm making a Cipher for personal use and possible publish as freeware. Can someone help me figure out what I'm missing in my code and/or post possible fixes? Thanks!
P.S. If this code looks ametuer, it's because it is. I'm just a freshman in college :)
Encryption Class:
import java.util.*;
import javax.crypto.*;
import javax.crypto.spec.*;
import java.security.*;
public class EncryptionModule {
static final int keylength = 42;
private SecretKeySpec skeySpec;
public EncryptionModule(String key)
skeySpec = makeKey(key);
public SecretKeySpec makeKey(String keys)
SecretKeySpec skeySpec = null;
try {
byte [] keys_raw = keys.getBytes();
skeySpec = new SecretKeySpec(keys_raw, "Blowfish");
} catch(Exception e) {
e.printStackTrace();
return skeySpec;
public String EncryptionModule(String line)
byte[] encrypted = new byte[0];
try {
Cipher cipher = Cipher.getInstance("Blowfish");
cipher.init(Cipher.ENCRYPT_MODE, skeySpec);
encrypted = cipher.doFinal(line.getBytes());
} catch(Exception e) {
e.printStackTrace();
return new String(encrypted);
public String Decrypt(String line)
byte[] decrypted = new byte[0];
try {
Cipher cipher = Cipher.getInstance("Blowfish");
cipher.init(Cipher.DECRYPT_MODE,skeySpec);
decrypted = cipher.doFinal(line.getBytes());
} catch(Exception e) {
e.printStackTrace();
return new String(decrypted);
File IO Class:
import java.io.*;
import java.awt.*;
import java.util.*;
public class FileIO
BufferedReader inputFile;
String inputFileName;
BufferedWriter outputFile;
String outputFileName;
ArrayList dataList;
ArrayList breakLine;
EncryptionModule EncryptionModuleor;
* Constructor for objects of class IO.
public FileIO(String key)
dataList = new ArrayList();
breakLine = new ArrayList();
EncryptionModuleor = new EncryptionModule(key);
public void main(String[] args) throws IOException
dataList = new ArrayList();
breakLine = new ArrayList();
setInputFile();
* setInputFile - Displays a dialog box to select and open a file for input
* @return true if success, false otherwise
public boolean setInputFile() throws IOException
boolean fileOpened = true;
FileDialog myDB = new FileDialog(new Frame(),"Select a log file for INPUT");
myDB.setDirectory(".");
myDB.show();
inputFileName = myDB.getFile();
if (inputFileName==null){
fileOpened = false;
else {
try {
inputFile = new BufferedReader(new FileReader(myDB.getDirectory()+"\\"+inputFileName));
catch(FileNotFoundException e) {
fileOpened = false;
return fileOpened;
* setOutputFile - Displays a dialog box to select and open or create a file for output
* @return true if success, false otherwise
public boolean setOutputFile() throws IOException
boolean fileOpened = true;
FileDialog myDB = new FileDialog(new Frame(),"Select or create a file for OUTPUT");
myDB.setDirectory(".");
myDB.setMode(FileDialog.SAVE);
myDB.show();
outputFileName = myDB.getFile();
if (outputFileName==null){
fileOpened = false;
else{
try {
outputFile = new BufferedWriter(new FileWriter(myDB.getDirectory()+"\\"+outputFileName));
catch(FileNotFoundException e) {
fileOpened = false;
return fileOpened;
public void processData()throws IOException
dataList = new ArrayList();
if (!setInputFile()){
System.out.println("Cannot open selected input file: "+inputFileName);
return;
String line;
line = inputFile.readLine(); //Read a new line from the input file
EncryptionModuleor = new EncryptionModule(line);
line = inputFile.readLine();
while(line != null)
dataList.add(EncryptionModuleor.EncryptionModule(line));
line = inputFile.readLine(); //Read a new line from the input file
copyFile();
public void copyFile() throws IOException
if (!setOutputFile()){
System.out.println("Cannot open selected output file: "+outputFileName);
return;
for (int i=0; i<dataList.size(); i++){
outputFile.write((String)dataList.get(i));
if (i<dataList.size()-1){
outputFile.newLine();
outputFile.close();
}You dont say what the problem is so one has to guess!
1) " return new String(encrypted);"
It is not realy safe to convert bytes to String this way. This must be close to the number 1 problem seen in this forum. Use something like Base64 or HEX encoding.
2) Don't just catch exceptions and print out stack traces!
If you intend to publish the encrytpion class then define an exception class specific to this problem (maybe more than one) and convert internal exceptions that you can't handle to this exception.
3) You ave not defined a mode or padding and are relying on the default. Make it explicit so there is no argument as to what mode and padding is being used.
4) For some reason you are breaking a file into lines and then encrypting each line. Why not just encrypt the whole file as bytes. Much easier, quicker, less code.
5) Rather than use a GUI to select the file why not make them command line parameters using the standard UNIX/DOS approach. -
Please Help with D-Bracket Code Error
Anyone have experience with a D-Bracket code 1-3 green 4-red? The manual says "Testing RTC (Real Time Clock)". On boot the system hangs on that code. So far it boots OK on reset but I have no idea where to start troubleshooting. I haven't changed my system since built in August 2004 and it has been perfect up to now. I'd appreciate any advice.
MSI 865PE Neo2-PLS
P4 3.0 GHz Northwood
2x512MB Geil PC3200
ATI Radeon Pro
WD 74GB Raptor
WD 80GB PATA
ePower 450w PS
LiteOn CDRW
Antec Super LANboyHave you tried changing mobo battery?
Disable bootup screen and see where does the system usually hangs.
You can try increasing your DDR Voltage to 2.7v. -
Please, help with simple modal progress dialog
Progress dialog will create a reader thread and block user input to main form until read is completed. It will have only a number of bytes received text message and one cancel button. It will be closed when user presses the button or thread is done with reading.
I understand the principles of IO and thread communication very well. I'm asking for modal dialog candidate. Should I override JDialog or it is possible to use JOptionPane or something else? The modal dialog should be able to register some listener to get progress messages from the reader thread.JOptionPane should be really easy way to go, since you can pass in an Object, and that object
could be a JPanel containing your JProgressBar and any other components/layout you want. -
Help with basic ABAP code (merge internal tables, sort of...)
Hello,
Can someone please help write some basic code for a Basis guy with limited ABAP knowledge?
Should be some easy points for an experienced ABAPer!
I have identicaly structured internal tables I_A and I_B and I_C which have already been filled by function models I called.
How will I code the following?:
I want to read all the data of I_A into a new internal table I_MASTER (structured the same as I_A,I_B and I_C).
Then I want to read I_B and:
1)Update I_MASTER with NEW records
2)Update existing records if the value of field MYFIELD in I_B is smaller than the value of MYFIELD in I_MASTER.
Then I want to read I_C and:
1)Update I_MASTER with NEW records
2)Update existing records if the value of field MYFIELD in I_C is smaller than the value of MYFIELD in I_MASTER.
Let me know if I can provide anymore information.
Thanks in advance for you help!
Adriaan
Message was edited by: Adriaan
Message was edited by: AdriaanHi Adriaan ,
I want to read all the data of I_A into a new internal table I_MASTER (structured the same as I_A,I_B and I_C).
<b>i_master[] = i_a[] .</b>
loop at i_b .
read table i_master with key myfiled < i_b-myfield .
if sy-subrc = 0 .
append i_master from i_b .
endif.
endloop.
loop at i_c .
read table i_master with key myfiled < i_c-myfield .
if sy-subrc = 0 .
append i_master from i_c .
endif.
endloop.
Let me know if this helped .
Regards,
Varun .
Message was edited by: varun sonu -
I switched over from an iPhone to a Samsung Galaxy S3 & I haven't been able to receive any text messages from iPhones. I have no problem sending the text messages but I'm not receivng any from iPhones at all. It has been about a week now that I'm having this problem. I've already tried fixing it myself and I also went into the sprint store, they tried everything as well. My last option was to contact Apple directly. Please help with turning my iMessage completely off so that I can receive my texts.
If you registered your iPhone with Apple using a support profile, try going to https://supportprofile.apple.com/MySupportProfile.do and unregistering it. Also, try changing the password associated with the Apple ID that you were using for iMessage.
-
How can I sync my iPhone on a different computer without erasing my applications? My iPhone was earlier synced with a PC which I don't use anymore.
On the new computer, I am getting a message that my all purchases would be deleted if I sync it with new iTunes library.
Please help with proper steps, if any.Also see... these 2 Links...
Recovering your iTunes library from your iPod or iOS device
https://discussions.apple.com/docs/DOC-3991
Syncing to a New Computer...
https://discussions.apple.com/docs/DOC-3141
Maybe you are looking for
-
Personalization and History view in the BEx Open dialog box
We have personalization activated for BEx and have turned it on for : -Activate BEx History ON -Variables Personalization ON -Web Report Personalization ON When users log in the History button appears when they attempt to open a BEx Q
-
Acrobat XI Quits When Trying To Print
Recently installed several Adobe products from the Creative Cloud onto my Snow Leopard Mac and whenever I try to print something from Acrobat, it quits. There's a bug in there somewhere but I have no idea how to rectify the situation and use the prod
-
I need to reinstall microsoft word on 10.4.11
I got the following message when I try to open MS Word: Microsoft Word cannot load the Microsoft Office shared libraries. The files may have been moved from their original locations. Try the following: Move Word back to the
-
Can I use create a job to export/import?
I want to export database on regular basis, is there a way to do that by a job? If yes, how? Thanks in advance.
-
What audio interface would you recommend for Garageband?
I'm a new Garageband user, and I would love to have some help in choosing an audio interface for. Is there an interface that is widely considered the "garageband interface"? Are there interfaces for Garageband that have phantom power? I'm looking for