Search:

Type: Posts; User: mjpam

Page 1 of 3 1 2 3

Search: Search took 0.23 seconds.

  1. Re: Implementing order of operations for a Java calculator.

    I already have some code that implements order of operations without algebraic grouping (i.e., parentheses/bracket):


    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;...
  2. Implementing order of operations for a Java calculator.

    How would I go about implementing order of operations for a calculator program that takes input from its GUI and stores it for further processing in the form of Strings?

    ETA: I accidentally hit...
  3. Replies
    3
    Views
    771

    Re: Compiling many source files at once

    Oh, I'm not resistant to using an IDE. I've just had two computers fail on me recently and I have been so busy that I haven't really thought about downloading Eclipse again.
  4. Replies
    3
    Views
    771

    Compiling many source files at once

    I want to compile many .java files at once but don't want to have to enter the file names into the command line one by one. (At this point it is a long and rather irrelevant but nonetheless sordid...
  5. Replies
    1
    Views
    822

    GridBagLayout help

    I may just be totally misusing GridBagLayout, but, given the tutorials I have read, I don't understand how I might be.

    The code is:

    import java.awt.*;
    import java.awt.event.*;
    import...
  6. Replies
    18
    Views
    1,141

    Re: What's Wrong With My Code?

    Someone who knows more than I can correct me, but classes do not need to begin with a capital letter in the sense that is a compile-time or run-time error if they don't. However, it is a coding...
  7. Replies
    3
    Views
    920

    Re: Object-oriented mess

    Yeah, that's what the Java 6 Documentation says.

    I find it strange that one can add a null ActionListener to a Component but not a null Component to a Component. In other word, I think it's...
  8. Thread: Learning Java

    by mjpam
    Replies
    7
    Views
    518

    Re: Learning Java

    Where is the array that you want to manipulate in your code?

    For loops are good for populating arrays but first you must have an array to populate. In the code that you have posted in the OP, your...
  9. Replies
    3
    Views
    920

    Object-oriented mess

    Long story short:

    I am writing an object-oriented calculator that I hope will have some of the functionality of the Windows calculator. So far, I have written two GUI's; one displays in an...
  10. Replies
    0
    Views
    741

    GridBagLayout display problem

    I am working on a GUI for a calculator. Since the GUI elements are of different sizes (e.g. I want the screen to extends all the way across the top of the GUI, while the buttons should be in a 4x4...
  11. Replies
    1
    Views
    677

    Applet ClassFormatError and magic values

    I am trying to turn a console application into an applet I have code that builds a GUI for a calculator that compiles and runs as expected:

    import java.awt.GridBagLayout;
    import...
  12. Replies
    4
    Views
    505

    Re: Input output file help

    Also, one other thing is that your if statement contains a null statement because you follow it immediately with a semicolon. If you want the next line of code to execute when the if condition is...
  13. Re: Why do these things fail sometimes? Annoying program!

    Does your code even compile?

    You are missing close parentheses on both your if conditions.

    Also could you provide more context?

    For instance what does token(type1, type2) do? What are its...
  14. Replies
    4
    Views
    732

    Re: Loop conditions not working

    If itemsCollected() returns false, itemsCollected() == false is true. Therefor, the entire while true when the first statement it true and the the second false.

    Does the loop execute when the...
  15. [SOLVED] Re: Confused about string that I think shouldn't be null

    Never mind. I figured it out.

    It was silly mistake.
  16. [SOLVED] Confused about string that I think shouldn't be null

    I am trying to write a basic four-function calculator. Here is the code:

    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    ...
  17. Replies
    11
    Views
    2,112

    Re: SQL query not working

    Yeah, sorry about that. The compiler doesn't tell me what the line numbers are, but a few well-placed test print statements indicate that the exception is thrown when the ResultSet is created,...
  18. Replies
    11
    Views
    2,112

    Re: SQL query not working

    Here is what I have now:

    String combQ = "SELECT AMINO_NAME, ONE_LTR, THREE_LTR FROM AMINO_ABBREV JOIN AMINO_PROP ON AMINO_ABBREV.AMINO_NAME=AMINO_PROP.AMINO_NAME";

    ...
  19. Replies
    11
    Views
    2,112

    Re: SQL query not working

    Which version of combQ did you use?
  20. Replies
    11
    Views
    2,112

    Re: SQL query not working

    I'm just using a standard Microsoft Access DB with a JDBC:ODBC connection. I was under the impression that SQL work under those condition. However, I only know enough SQL to create tables and query...
  21. Replies
    11
    Views
    2,112

    Re: SQL query not working

    Is there a better bioard on which to post JDBC question where the problem is mostly with the SQL?



    How would you do this?



    This throws the following exception:
  22. Replies
    11
    Views
    2,112

    SQL query not working

    import java.net.*;
    import java.sql.*;
    import java.io.*;
    import java.util.*;

    class MakeDB
    {

    public static void main (String args[])
    {
  23. Thread: Help please!

    by mjpam
    Replies
    5
    Views
    483

    Re: Help please!

    I misspoke.

    What type of object is toCharArray() a method for?

    What type of object have you called toCharArray on? Is it a String? Is it an array of Strings? Is it something else altogether?
  24. Thread: Help please!

    by mjpam
    Replies
    5
    Views
    483

    Re: Help please!

    You should read the documentation on the String class. Check that you are actually using a method that is defined for the class.
  25. Replies
    6
    Views
    4,688

    Re: Dynamically resizing an applet

    First, thank you for the example.

    I've read through the HTML source code several time and I'm wondering how of it is HTML.

    Is the only non-HTML code the last lines?

    <A...
Results 1 to 25 of 75
Page 1 of 3 1 2 3