Help Please Needed for Java Calculator - ActionListener HELP

Hi. I am constructing a simple Java calculator and need help with the actionlistener and how it could work with my program. I am not too sure how to begin constructing the actionlistener. I would like to know the best and most simple solution to get this program work the way it should, like a real calculator. If anyone can help me, that would be much appreciated.
package calculator;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class CalculatorGUI extends JFrame implements ActionListener{
JTextField screen;
JButton button7;
JButton button8;
JButton button9;
JButton button4;
JButton button5;
JButton button6;
JButton button1;
JButton button2;
JButton button3;
JButton button0;
JButton add;
JButton minus;
JButton multiply;
JButton divide;
JButton equals;
JButton clear;
private JTextField m_displayField;
private boolean m_startNumber = true;
private String m_previousOp = "=";
private CalculatorLogic m_logic = new CalculatorLogic();
public CalculatorGUI() {
CalculatorGUILayout customLayout = new CalculatorGUILayout();
getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
getContentPane().setLayout(customLayout);
screen = new JTextField("textfield_1");
getContentPane().add(screen);
button7 = new JButton("7");
getContentPane().add(button7);
button7.addActionListener(this);
button8 = new JButton("8");
getContentPane().add(button8);
button8.addActionListener(this);
button9 = new JButton("9");
getContentPane().add(button9);
button9.addActionListener(this);
button4 = new JButton("4");
getContentPane().add(button4);
button4.addActionListener(this);
button5 = new JButton("5");
getContentPane().add(button5);
button5.addActionListener(this);
button6 = new JButton("6");
getContentPane().add(button6);
button6.addActionListener(this);
button1 = new JButton("1");
getContentPane().add(button1);
button1.addActionListener(this);
button2 = new JButton("2");
getContentPane().add(button2);
button2.addActionListener(this);
button3 = new JButton("3");
getContentPane().add(button3);
button3.addActionListener(this);
button0 = new JButton("0");
getContentPane().add(button0);
button0.addActionListener(this);
add = new JButton("+");
getContentPane().add(add);
add.addActionListener(this);
minus = new JButton("-");
getContentPane().add(minus);
minus.addActionListener(this);
multiply = new JButton("*");
getContentPane().add(multiply);
multiply.addActionListener(this);
divide = new JButton("/");
getContentPane().add(divide);
divide.addActionListener(this);
equals = new JButton("=");
getContentPane().add(equals);
equals.addActionListener(this);
clear = new JButton("Clear");
getContentPane().add(clear);
clear.addActionListener(this);
setSize(getPreferredSize());
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
public void actionPerformed(ActionEvent event) {
public static void main(String args[]) {
CalculatorGUI window = new CalculatorGUI();
window.setTitle("Calculator");
window.pack();
window.show();
class CalculatorGUILayout implements LayoutManager {
public CalculatorGUILayout() {
public void addLayoutComponent(String name, Component comp) {
public void removeLayoutComponent(Component comp) {
public Dimension preferredLayoutSize(Container parent) {
Dimension dim = new Dimension(0, 0);
Insets insets = parent.getInsets();
dim.width = 421 + insets.left + insets.right;
dim.height = 494 + insets.top + insets.bottom;
return dim;
public Dimension minimumLayoutSize(Container parent) {
Dimension dim = new Dimension(0, 0);
return dim;
public void layoutContainer(Container parent) {
Insets insets = parent.getInsets();
Component c;
c = parent.getComponent(0);
if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+8,408,64);}
c = parent.getComponent(1);
if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+80,96,56);}
c = parent.getComponent(2);
if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+80,96,56);}
c = parent.getComponent(3);
if (c.isVisible()) {c.setBounds(insets.left+232,insets.top+80,96,56);}
c = parent.getComponent(4);
if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+144,96,56);}
c = parent.getComponent(5);
if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+144,96,56);}
c = parent.getComponent(6);
if (c.isVisible()) {c.setBounds(insets.left+232,insets.top+144,96,56);}
c = parent.getComponent(7);
if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+208,96,56);}
c = parent.getComponent(8);
if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+208,96,56);}
c = parent.getComponent(9);
if (c.isVisible()) {c.setBounds(insets.left+232,insets.top+208,96,56);}
c = parent.getComponent(10);
if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+272,96,56);}
c = parent.getComponent(11);
if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+80,72,56);}
c = parent.getComponent(12);
if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+144,72,56);}
c = parent.getComponent(13);
if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+208,72,56);}
c = parent.getComponent(14);
if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+272,72,56);}
c = parent.getComponent(15);
if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+336,72,56);}
c = parent.getComponent(16);
if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+408,408,72);}
}

Yeah, I have a rough idea of what the calculator
should do, like most people would. Its just that I
dont know how to implement this in Java. Thats the
problem. Can anyone provide me with code snippets
that I can try?No I would rather see you make an effort from what has been discussed here. This is not a Java problem this is a general programming problem.

Similar Messages

  • Help is needed for java mp3 project!!

    I'm doing a java applet which hav the function of playing mp3 files as for my case is .wav file.. I can start to play by using the audio clip object file but how about jumping to next song by pressing the fast forwad button and back track the previous ones by pressing the backward button.. Does we need to use a loop or method? Please give me some advise Plz.... Thnks..

    Hi, I've just done a music playing app, an I used JMF,
    http://java.sun.com/products/java-media/jmf/index.jsp
    Give that a go.

  • Can i download java for my ipad, the problem is i open glovis.usgs from my ipad, but i can't see the full page, cause the page need a java...help me please

    Can i download java for my ipad, the problem is i open glovis.usgs from my ipad, but i can't see the full page, cause the page need a java...help me please

    Nope. The iPad (and iPhone and iPod touch) cannot execute Java applets. It's a limitation in iOS from the beginning (just like lack of Flash). You will either need to use a desktop computer or access a desktop computer via RDP or VNC to access that page on iPad.mIn short: there is no native way to use a Java applet on iOS.

  • Help with (forte for Java CE) please

    I had installed forte for Java CE and had recieved some problems. After I installed the program and tried to run it it said this error.
    Cannot load c:\j2sdk1~1.1_0\jre\bin\classic\jvm.dll
    Bacicly why I installed forte was for the debugger part. Jedit doesn't seem to work for me. I'm using windows xp home edition.
    Any help would be great
    Thanks in advance
    George

    Try downloading a newer SDK and getting
    c:\j2sdk1~1.1_0\jre\bin
    out of the path

  • Need some help with tools for java projects

    Hi Friends,
    I just want to know what software release management tool do you use.Is there any free tool available on net??
    I do not need a subversion tool( cvs,svn etc) or a automation build tool ( luntbuild, cruisecontrol, anthill) , I am looking for some tool,that helps you manage the release after its made.For example,i would like to track down which release was made to which customer on which date,how many releases were made to any particular customer,what source code was shipped to the customer..and so on....
    Is there any such tool that can accomplish this???
    Thanks

    Hi Friends,
    I just want to know what software release management tool do you use.Is there any free tool available on net??
    I do not need a subversion tool( cvs,svn etc) or a automation build tool ( luntbuild, cruisecontrol, anthill) , I am looking for some tool,that helps you manage the release after its made.For example,i would like to track down which release was made to which customer on which date,how many releases were made to any particular customer,what source code was shipped to the customer..and so on....
    Is there any such tool that can accomplish this???
    Thanks

  • Exceptions in QuickTimes for JAVA examples - plz help!

    Hello,
    I have a problem with the QuickTime for JAVA Applet Demos.
    I set the correct CLASSPATH and the examples with the Frames are working fine. The Compilation of the Applet examples also works.
    set CLASSPATH=C:\Programs\Java\j2re1.4.2_02\lib\ext\QTJava.zip;.
    javac -classpath C:\Programs\Java\j2re1.4.2_02\lib\ext\QTJava.zip;. QTSimpleApplet.java
    But when I want to run and test them with the Internet Explorer or SUNs appletviewer an
    Exception is thrown (NoClassDefFoundError) and an error message appears in the appletviewer / browser: "Applet could not be initialized".
    java.lang.NoClassDefFoundError: quicktime/QTException
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
    at java.lang.Class.getConstructor0(Class.java:1922)
    at java.lang.Class.newInstance0(Class.java:278)
    at java.lang.Class.newInstance(Class.java:261)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
    at sun.applet.AppletPanel.run(AppletPanel.java:298)
    at java.lang.Thread.run(Thread.java:534)
    When I copy the extracted QTJava.zip to the directory where the source file and the class file for the example are located an other Exception is thrown (ExceptionInInitializerError). :-( This Except. is caused by the security.
    java.lang.ExceptionInInitializerError
    at quicktime.jdirect.QTNative.loadQT(QTNative.java:33)
    at quicktime.jdirect.QuickTimeLib.<clinit>(QuickTimeLib.java:17)
    at quicktime.QTSession.<clinit>(QTSession.java:82)
    at QTSimpleApplet.init(QTSimpleApplet.java:34)
    at sun.applet.AppletPanel.run(AppletPanel.java:353)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.QTJava)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
    at java.security.AccessController.checkPermission(AccessController.java:401)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
    at java.lang.SecurityManager.checkLink(SecurityManager.java:810)
    at java.lang.Runtime.loadLibrary0(Runtime.java:782)
    at java.lang.System.loadLibrary(System.java:834)
    at quicktime.jdirect.JDirectLinker$1.run(JDirectLinker.java:266)
    at java.security.AccessController.doPrivileged(Native Method)
    at quicktime.jdirect.JDirectLinker$1$PrivelegedAction.establish(JDirectLinker.java:264)
    at quicktime.jdirect.JDirectLinker.<clinit>(JDirectLinker.java:272)
    ... 6 more
    How can I solve these problems? I just want to view some movies in an applet!
    Please help me. Thanks in advance!

    Hi
    I also has similar problem using the QuickTime using via Applet.
    When I connect QuickTime via Applet, I have the error message
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.QTJava)
    I know that
    this error is caused by the Java security "sandbox" for Plug-in.
    Plug-in has restrictions for unsigned applets..and
    I can use the QuickTime via Applet, if did manual editing of the java.policy file in the JRE.
    ( grant { permission java.security.AllPermission; } )
    But editing of the java.policy file is discouraged...
    My question is why loadLibrary.QTJava has restrictions for unsigned applets??
    and how can I use QuickTime via Applet without manual editing of the java.policy??
    Please give me some advice.

  • F1 help in webdynpro for java

    Hello Exports,
    I wish to implement F1 help for fields on webdynpro page. Is this possible in webdynpro for Java? Any kind of reference in this regard will be useful.
    Best regards,
    Nakul

    Hi
    You can use and implement the FunctionKey UI Element in  WebDynpro. Find the below link to know about that.
    [http://help.sap.com/erp2005_ehp_03/helpdata/EN/f6/bff640fa4b8631e10000000a1550b0/frameset.htm|http://help.sap.com/erp2005_ehp_03/helpdata/EN/f6/bff640fa4b8631e10000000a1550b0/frameset.htm]
    Thanks
    Suresh

  • Help, advice needed for learning Action Script

    I don't have any experience with programing and even scripting and I can't find tutorials for total beginners. I started to read this one
    http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b8cbfe-7ff7.html
    but I have difficulties understanding the explanations.
    If you have any advice and pointers to tutorials for total dummy beginners I will greatly  appreciate it.

    I’m 27 years old and one month ago I started study ActionScript 3.0. After red a lot of forums with recommendations about what need to do for study as3 I clear next things:
    Try to visit forums about as3 and discus with people about your problems and also try to help other solve their problems (you can help a lot of people to solve their problems, you can find a lot answers to your questions, you can share your experience with others)
    Try to read books about as3 (in books you can find all theory and some examples for this theory, so this info will be very helpful for you, because it’s a fundamental knowledge what you must to know)
    Try to visit sites with tutorials (on the net you can find a lot sites with tutorials and there you step by step will study a lot of things)
    Share your knowledge with others (create your blog or something else where you will show to people your examples of work, where you will write about as3 and will share your experiences and knowledge, this can give you chance to consolidate your knowledge and give opportunity other people study as3)
    Try to separate big not understandable problem to smaller(after you find answer to all small problems you can find answer to big problem)
    And the main what you must remember then YOU MUST CODING EVERY DAY! (I think without it you never been a as3 coder.)
    I can recommend next sites witch can help you to study ActionScript 3.0:
    Books:
    <a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/">http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/</a><br>
    <a href="http://www.amazon.com/Essential-ActionScript-3-0-Colin-Moock/dp/0596526946">Essential ActionScript 3.0</a><br>
    <a href="http://www.amazon.com/Learning-ActionScript-3-0-Beginners-Guide/dp/059652787X/ref=sr_1_2?i e=UTF8&s=books&qid=1261737552&sr=1-2">Learning ActionScript 3.0: A Beginner's Guide</a><br>
    <a href="http://www.amazon.com/ActionScript-Adobe-Flash-Professional-Classroom/dp/0321579216/ref=sr _1_6?ie=UTF8&s=books&qid=1261737552&sr=1-6">ActionScript 3.0 for Adobe Flash CS4 Professional Classroom in a Book</a><br>
    <a href="http://www.amazon.com/ActionScript-3-0-Game-Programming-University/dp/0789737027/ref=sr_1_ 7?ie=UTF8&s=books&qid=1261737552&sr=1-7">ActionScript 3.0 Game Programming University</a><br>
    <a href="http://www.amazon.com/ActionScript-3-0-Cookbook-Application-Developers/dp/0596526954/ref=s r_1_8?ie=UTF8&s=books&qid=1261737552&sr=1-8">ActionScript 3.0 Cookbook: Solutions for Flash Platform and Flex Application Developers</a>
    Forums:
    <a href="http://forums.adobe.com/community/flash/flash_actionscript3">http://forums.adobe.com/community/flash/flash_actionscript3</a><br>
    <a href="http://www.actionscript.org/forums/forumdisplay.php3?f=75">http://www.actionscript.org/forums/forumdisplay.php3?f=75</a><br>
    <a href="http://www.flasher.ru/forum/forumdisplay.php?f=83">http://www.flasher.ru/forum/forumdisplay.php?f=83</a>
    Blogs:
    <a href="http://theflashblog.com/">http://theflashblog.com/</a><br>
    <a href="http://www.mikechambers.com/blog/">http://www.mikechambers.com/blog/</a><br>
    <a href="http://as3journal.blogspot.com/">http://as3journal.blogspot.com/</a><br>
    <a href="http://flash-templates-today.com/blog/">http://flash-templates-today.com/blog/</a> <br>
    <a href="http://xitri.com/">http://xitri.com/</a><br>
    <a href="http://www.hamstersteam.com/">http://www.hamstersteam.com/</a><br>
    <a href="http://flash-animation.ru/">http://flash-animation.ru/</a><br>
    <a href="http://www.keyframer.com/">http://www.keyframer.com/</a>
    Tutorials:
    <a href="http://cookbooks.adobe.com/actionscript">http://cookbooks.adobe.com/actionscript</a><br>
    <a href="http://www.hongkiat.com/blog/30-free-flash-photo-galleries-and-tutorials/">http://www.hongkiat.com/blog/30-free-flash-photo-galleries-and-tutorials/</a><br>
    <a href="http://www.ilike2flash.com/">http://www.ilike2flash.com/</a><br>
    <a href="http://xuroqflash.com/">http://xuroqflash.com/</a><br>
    <a href="http://www.emanueleferonato.com/category/actionscript-3/">http://www.emanueleferonato.com/category/actionscript-3/</a><br>
    <a href="http://www.graphicmania.net/category/adobe-flash/">http://www.graphicmania.net/category/adobe-flash/</a><br>
    <a href="http://www.flashperfection.com/">http://www.flashperfection.com/</a><br>
    <a href="http://active.tutsplus.com/category/tutorials/">http://active.tutsplus.com/category/tutorials/</a><br>

  • Porting from JDK 1.2.2 to MS SDK for Java 4.0 - Help!!!

    Hi All!
    My company is developing big project using WLS 4.5.1. + JDK 1.2.2 + Java
    Plug-In 1.2.2 on clients. A lot of applied code depend on Java 2 APIs,
    javax/swing is actively used as well. But the customer decide to use
    Microsoft VM both on server and client sides - they have support contract
    (for other products) with MS and MS may decide to cancel support if our
    customer will use Sun JDK and Sun JVM.
    So, I have to try to port all project to MS SDK for Java and the question
    is: Do I have a chance not to rewrite 100% of my code?
    Somewhere I read: ":I've downloaded the new MS Virtual Machine
    (msjavx86.exe) that should be compatible to Java2:" - is it really so? Does
    anybody knows if MS will support Java 2 platform specifications? As I found
    at MS, latest MS JDK 4.0 (on which WLS 5.1 can run) meets specification of
    Java 1.1 and after installing it I found that I must rewrite about 90% of my
    code. Can someone clarify the situation with MS JDK?
    Thanks in advance,
    Andrey Bogush
    PS: Any information, links, documents, overviews on how to persuade the
    customer to use Sun JDK and JVM against MS one are VERY and STRONGLY welcome

    Andrey Bogush wrote:
    >
    Hi All!
    My company is developing big project using WLS 4.5.1. + JDK 1.2.2 + Java
    Plug-In 1.2.2 on clients. A lot of applied code depend on Java 2 APIs,
    javax/swing is actively used as well. But the customer decide to use
    Microsoft VM both on server and client sides - they have support contract
    (for other products) with MS and MS may decide to cancel support if our
    customer will use Sun JDK and Sun JVM.MS can cancel their support if they use Sun's JDK! That's an
    "interesting" clause in your support contract.
    >
    So, I have to try to port all project to MS SDK for Java and the question
    is: Do I have a chance not to rewrite 100% of my code?
    Somewhere I read: ":I've downloaded the new MS Virtual Machine
    (msjavx86.exe) that should be compatible to Java2:" - is it really so?I don't believe any versions of Microsoft's JVMs support Java2.
    Personally, I think it would be a big waste of time to port working
    Java2 code to JDK 1.1 just to run MS's JVM.
    -- Rob
    Does
    anybody knows if MS will support Java 2 platform specifications? As I found
    at MS, latest MS JDK 4.0 (on which WLS 5.1 can run) meets specification of
    Java 1.1 and after installing it I found that I must rewrite about 90% of my
    code. Can someone clarify the situation with MS JDK?
    Thanks in advance,
    Andrey Bogush
    PS: Any information, links, documents, overviews on how to persuade the
    customer to use Sun JDK and JVM against MS one are VERY and STRONGLY welcome

  • HELP I NEED A JAVA SCRIPT

    I NEED A JAVA SCRIPT that chance the crouser on my webpage
    my webpage is made whit flash
    so i want i want a script that chance the cruser(mouse-pointer)

    <script language="JavaScript">
    alert("WRONG FORUM, Suggest you do a google search....");
    </script>

  • Some help needed for shopping calculator program

    Hi. I would like to thank you in advance for helping me. At the moment I am pretty much stuck. I don't know how to add the input using 'while loop'. This is what I'm suppose to do:
    Write a program called ShoppingCalculator.java that allows the user to enter the prices of several items they have bought and then tells them the total amount. The user can enter the prices for as many items as they want, until they click Cancel. The program should then output the total amount they spent, in a message dialog box. Use pounds for all the amounts.
    So far I have written:
    import javax.swing.JOptionPane;
    public class ShoppingCalculator
        public static void main(String[] args)
                boolean done = false;
                double amount;
                String input;
                while (!done)
                        input = JOptionPane.showInputDialog("Enter the amount you spent on the next item:");
                        amount = Double.parseDouble (input);
                if (done = true)
                        JOptionPane.showMessageDialog (null, "You spent a total amound of £" + amount  );
    }Sorry if the code doesn't make much sense cause I've been changing the code around so many times that.
    At one point when I was playing around with the code, I manage to make the input dialog loop nicely but when I pressed cancel, the message dialog only output the last input I put in. What I'm really stuck here is I need to know how to add the input when using 'while loop' and is it correct to use the IF Statement on this program. Please give me some advice on how to and I will try to work on it again.

    Ok. I have edit the code and this is what it looks like:
    import javax.swing.JOptionPane;
    public class ShoppingCalculator
        public static void main(String[] args)
                boolean done = false;
                double amount;
                String input;
                double total = 0;
                while (!done)
                        input = JOptionPane.showInputDialog("Enter the amount you spent on the next item:");
                        amount = Double.parseDouble (input);
                            if (input == null)
                                        total = total + amount;
                                        JOptionPane.showMessageDialog (null, "You spent a total amound of " + total  );
    }I created another variable (total) and it even compiled. The only problem I have now is the message dialog wouldn't show at the end. When I press cancel and nothing happen. This is what I get on my output command window:
    Exception in thread "main" java.lang.NullPointerException
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:991)
    at java.lang.Double.parseDouble(Double.java:510)
    at ShoppingCalculator.main(ShoppingCalculator.java:23)
    Java Result: 1
    Anything that isn't right here?

  • Help Needed for Java Project

    I have to do a project in my final year Computer Engineering. Can someone give me any ideas about project(to be done in Java)? If anyone can help me with any idea, please do so. Thank You!!

    Hi,
    I did a project on jsp and EJB called Dataminig implemented in Online shopping. Dataminig is an upcomming technology for Customer Relationship management. You can also do some kinda project like online patient monitering. In this project you can even see how to communicate through COM port.

  • NEED a java coder to help with a script for a programs of mine.

    I play a game, very competitively, and need someone to make and compile a script for me. I am willing to pay upwards of 100 USD for this script made to MY standards. There will be a lot of work involved...Probably 12 hours studying my game and the purpose of the script(s). I will be buying 2-3 scripts, at roughly 50-100 USD each, depending on the quality. I will transfer the money via paypal, or other means if we can reach an agreement.
    Please IM me at Chadtrapier on AIM or send an email to [email protected]
    Or...Add me on MSN - [email protected]
    We can reach an agreement with these scripts...
    Thank you, I will also check this thread, so reply if you would like.
    ~Chad

    Ummm. Do you think that's a lot of money or something? Think in the range of 40-60 per hour. And if you're talking about warcraft I don't think they java hooks to make bots. I think you need to figure out what your problem is first and maybe learn to code them yourself.

  • Help please need to install java update 3

    Just updated to java update 4. I have medical software on the computer and it breaks. I need to roll back one version. Can anyone help me out with this? 10.6.6 OS

    OK, there is a method, but it is risky at best. Backup your data before proceeding*:
    http://www.macmaps.com/backup.html
    Note where it says on these instructions rm -rf:
    http://weblogs.java.net/blog/joshy/archive/2007/11/howto_removej.html
    Change that "f" instruction to i (the letter I as in I am).
    So you would say:
    sudo rm -ri /System/Library/Frameworks/JavaVM.framework/Versions/(whatever the version is that is newer)
    If you are unsure of the version, look it up first by typing:
    ls -aF /System/Library/Frameworks/JavaVM.framework/Versions/
    And determine which ones are newer.
    Answer 'n' to the rm once files are listed that you don't want. Careful not to go trigger happy with the 'y' as it automatically takes every 'y' response as an affirmative.
    - * Links to my pages may give me compensation.
    Message was edited by: a brody

  • Help needed for java network programming

    How can I implement a GUI as a client in my server-client program.
    I have a window(JFrame)having one Textfield and a "Send" button.
    My requirement: While execution, the GUI should start as a client, and whatever textinput I will give to the Textfield, that should be printed in the server program.
    So, how can I implement a GUI window as a client.
    If any of U have idea,Please let me know soon.
    Regards.

    Well, the client part and the GUI part are separate. The button simply calls a send method.
    As for the networking, you can just use a Socket and a ServerSocket on the client and server, respectively. Then, wrap a PrintStream around one side and a BufferedReader(InputStreamReader()) around the other. You'll be able to talk back and forth once your connection is established; it's up to you to read from the BufferedReader and use the results on the server side.

Maybe you are looking for

  • Text overflown in the first page is not getting printed in the next page

    Hi Experts, I have a text field, where the users can enter the comments. In this text field if the user enters more than a page, a scroll bar appears in the print preview where the users can view the complete text what they have entered, but while pr

  • Feedback on Outlook 2010 Conversations View

    Outlook 2010 Conversations view is a great idea, but the Beta implementation has a few usability problems which prevent the feature from being successful-- if I had to use the feature in RTM in its current Beta state, I'd probably turn it off. But fi

  • Send Business Object Instance as Attachment in SAP mail

    Hi All, The requirement is something like this. I would like to send out a mail to user with a Sales Order Display as an attachment. I did go through some of the documentation that all specifies sending lists, Office Documents as attachments but not

  • How to put signal in spreadsheet

    Hello National Instruments, I need to take a .bmp file which is a picture of 5 lights. I then need to get the average signal of the 5 lights and the average signal of the background. Then take a ratio of lights to background to determine signal to no

  • Turn Logging on for field AFVC-PHFLG

    If an operation is deleted prior to releasing an order. The operation is truly deleted and we can find the deletions in the change documents. Once an order is released, if  user deletes the operation, the field AFVC-PHFLG is updated and there is how