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;...
Type: Posts; User: mjpam
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;...
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...
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.
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
Never mind. I figured it out.
It was silly mistake.
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.*;
...
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,...
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";
...
Which version of combQ did you use?
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...
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:
import java.net.*;
import java.sql.*;
import java.io.*;
import java.util.*;
class MakeDB
{
public static void main (String args[])
{
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?
You should read the documentation on the String class. Check that you are actually using a method that is defined for the class.
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...