Help me find what's the problem! Thanks!
In my meaning, I want to click the button (transformbutton), then will achieve the transformation process. (The transformation process has been test successfully, now I defined it as a method). There might be something wrong with the action, but I don't know where it is. When I click the button, there is nothing happen.
Could anybody help me check and solve this problem? Thanks a lot!
The code is attached below:-
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
public class Interface extends JApplet
String[] birdname ={"", "chaffinch", "barn_swallow"};
JPanel jPanel1 = new JPanel();
JLabel jLabel1 = new JLabel();
JComboBox birdBox = new JComboBox(birdname);
JButton transformButton = new JButton("Transform");
JTextField text = new JTextField(30);
//Initialize the applet
public void init()
try
jbInit();
catch(Exception e)
e.printStackTrace();
//Component initialization
private void jbInit() throws Exception
birdBox.setSelectedIndex(0);
this.setSize(new Dimension(400, 300));
jPanel1.setBackground(new Color(0, 83, 255));
jPanel1.setPreferredSize(new Dimension(400, 300));
jLabel1.setFont(new java.awt.Font("Dialog", 1, 12));
jLabel1.setBounds(65,55,150,25);
jLabel1.setForeground(Color.white);
jLabel1.setText("Select a Bird");
birdBox.setBackground(Color.white);
transformButton.setBounds(75,75,60,25);
this.getContentPane().add(jPanel1, BorderLayout.CENTER);
jPanel1.add (jLabel1);
jPanel1.add(birdBox);
jPanel1.add(transformButton);
jPanel1.add(text);
transformButton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
try
Transform();
text.setText ("The Transformation is finished!");
catch (IOException ex)
catch (TransformerException ex)
public void Transform() throws TransformerException, TransformerConfigurationException,
FileNotFoundException, IOException
//first round transformation
TransformerFactory tFactory = TransformerFactory.newInstance ();
Transformer transformer = tFactory.newTransformer (new StreamSource ("onebird.xsl"));
transformer.transform (new StreamSource ("birds_06_2_oneBird_2_xmlbackend.xml"), new StreamResult (new FileOutputStream ("chaffinch.xml")));
System.out.print ("The Transformation is finished!");
}
And, I have obtained that exception by adding the system.out.print() in the catch clause. This exception is caused by the TransformerException.
I expect that somebody can help me get rid of that exception and made the transformation successfully.
Waiting for the answer online.....Thanks!
Similar Messages
-
My July 2009 iMac with OSX Mavericks "iMac is not supported" when I tried to perform bluetooth with my iPhone 5. What is the problem. thanks
Bluetooth is only supported for tethering.
Barry -
My father's MAc is still on Snow Lepoard. Ovewr the weekend his Mail sent out over 400 emails to contacts. We were unable to delete the messages. 1. Does anyone know what the problem is 2. If so how can we fix it.
PBThanks. Will di immediately. Do you think I need to change the address as well or should just the password be sufficient.
PB -
if anyone knows anything about this, please help!
Hello Giggles36468,
Thank you for using Apple Support Communities.
For more information, take a look at:
iTunes Store: See your purchase history and web order numbers
http://support.apple.com/kb/HT2727
To see a purchase's details, click the arrow to the left of the order date. Your most recent purchases are first.
The web order number appears under the date of each transaction.
Have a nice day,
Mario -
The answer helped me.But still, what are the settings that I have to change for the behavior of the mouse pointer towards finder? Also the mouse pointer sometimes doesn't accept my command and start clicking itself.what is the problem and how to fix it?
If the mouse clicks something on its own then it looks like you have a hardware problem with the trackpad or possibly the battery that is right underneath the trackpad.
I have read that the battery can swell and that would put pressure on the trackpad. -
i am using firefox 3.6.17 i upgraded it to 4.1.but it does not work properly sometimes it opens every website and most of the time it does not work . so what is the problem please help . thank you
Did you check your security software (firewall)?
A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process.
See:
* [[Server not found]]
* [[Firewalls]] -
Hy. please help me. what's the problem? when i accessing icloud or find my friend:The maximum number of free accounts have been activated on this iPhone.
Then you'll have to use another iOS device or Mac running OS X Lion or higher to create a new account for you to use on your phone. If you don't have one, perhaps a friend would allow you to create and account on their device (note: this will use one of their three maximum accounts). To do this, they would need to go to Settings>iCloud, tap Delete Account (which will delete the account from their device but not from iCloud), then allow you to sign back in with your ID to create the new account. Then tap Delete Account to delete the new account from their device, and finally, sign back in with their iCloud ID to restore their iCloud account to their device. Then you can sign in with your ID on your phone in Settings>iCloud and use the new account.
-
I connected my ipod touch 4g wi-fi with laptop ad hoc network....it's showing wi-fi signals but internet is not working...what is the problem in that can anyone help me...inadvances thanks
my laptop is Windows 7 and ip is this
192.168.102.12
255.255.255.0
192.168.102.1
DNS
192.168.254.2
192.168.254.3
in ipod touch 4g is DHCP and its showing
ip address 169.254.192.139
subnet mask 255.255.0.0.
remaining all blank -
Dear the new update iOS 7.0.4 is not opening some pages in safari. Tray to find out what's the problem. Thanks
There are billions of web pages. Any clue as to which ones are not opening?
-
Just installed Lion and iCloud. Now I'm not able to open the Mail program. What's the problem? Thanks.
AndrewDear Ralph, thank you for your lightspeed answer!
When I had installed the app, there was been written: "open", and when I pushed this, NO reaction of the iPad! And crazy too: I am NOT able to find the app itself at any screen of the iPad!!! I can see it only in the list "bought" items. With other words: The app is neither to be seen nor I am able to open it in the "list".
Thank you in advance for your advice
Best greetings from Austria (Wien, Vienna)
Wiener Schnitzel -
Hello, i am using ipad mini now. When i charge it till 90%, it will stop charging on its own. I need to reconnect in order to charge it till 100%. Another problem is when i am using an apps, for example looking through the photo, suddenly the screen will back to Home. Anyone know what is the problem? Thanks.
This is a user-supported board. You are not addressing Apple here. Nor is it a good idea to post your private information to a public forum. You should edit your post immediately.
Unfortunately no one here can access your support history. You must respond to the emails directly. -
Hi, i just bought a ATV2. The ATV2 works find but does'nt display my Itune account. I have everything shared. What is the problem ?
Whar do you mean by "show up on my display "?
Go to Finder>General, is External disks checked? -
Tried to access programs and get Error: 16 message. What's the problem? Please help! Photoshop, photoshop elements, Dreamweaver - none of my Creative Cloud apps will start-up, since my last update. I need to access these programs for jobs I'm working on.
Hi wdriver,
It seems like due to some unknown reason permission from the Licensing folder is removed. Please try launching any of the apps by right clicking and select Run as an Administrator, it should fix the issue by doing that.
Please let us know if it helps.
Regards,
Abhijit -
Every time I try to send to the trash anything, appears de following: Finder is trying to make changes. Introduce your password to allow this action. Appears since 24h ago, never before had this problem, What´s the problem? I am using Mac OS lion
Can you post the permissions on your Home folder?
Open Terminal, copy and paste this command. Copy the output and post here. If you want to mask out your user name, then paste the output into a text editor and use Find/Replace to change it to something like "username" before pasting it in here.
ls -ale -
Time could not backup message said the back up disk image "/Volumes/Data-1/......iMac.sparsebundle" is already in use.( the ..... is my name on the message)
Can anyone please help me, with what to do?
Thanks SueOk.. read C12 and C17 is also relevant in Pondini troubleshooting.
http://pondini.org/TM/Troubleshooting.html
Try the above.
No luck then you should do
A1 .. Load the widget so you know what TM is doing.
A4 .. Reset of TM.
A5.. Verify the backup.
First thing.. though.. do a full network reboot..
Turn off everything.. restart the modem.. wait 2min.
Restart the TC.. wait 2min
Restart the computer. See if it now functions.
You might have to reset or do more severe stuff.. but try with that.
I am offline for 8 hours..
Pondini or one of the others here might be able to help further.
Maybe you are looking for
-
I had a suscription that is over .Now I have a promotional code (for new suscription) but I don not know where introduce it ( I use PC)
-
Passing Cookies to ?cmd=login
Can someone please tell me if the PS servlet strips cookies from requests to ?cmd=login? I've written some JavaScript to do a conditional redirect based on a cookie that is passed with the HTTP request. If I put the JavaScript in signon.html, it work
-
Working/Join with Two Reports field
Hey Folks, I have read couple of post and kind of confused. I have two reports and each have their column total at the bottom(Sum). Now on my first report i have to add my first report col1_total+second report col1_total and get my grand total. SO, m
-
the printer display reads at least on of the cartridges a problem. after carfully cleaning, reinserting new cartriges, and even resetting the printer it continutes to read the same message and wont allow me to print or use the device. i need this pri
-
How do you unlock home screen?
How do you unlock home screen? I want it to turn when I move phone.