32,204 Topics
| |
Write a program that evaluates an expression.assume the operands are integers and operators are +, −, *, /. Please help me. | |
Hi this isnt wrking i need help!!!! [code] import javax.swing.*; import java.awt.event.*; import java.awt.*; //used for layout manager import java.util.Random;; class GuessGame extends JFrame { private JButton newButton; private JTextField gField; //stands for guess field private JLabel firstPrompt, enterLabel, userMessageLabel; private int randomNumber, userGuess; private int counter = 0; private … | |
I have this error --------------------Configuration: <Default>-------------------- Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at java.awt.Container.addImpl(Container.java:1041) at java.awt.Container.add(Container.java:959) at javax.swing.JFrame.addImpl(JFrame.java:540) at java.awt.Container.add(Container.java:365) at ticketReservation.<init>(ticketReservation.java:114) at bookAngels.actionPerformed(bookAngels.java:163) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6267) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6032) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577) at … | |
how do you print out to a text file in tabular form like the soccer teams and their info. | |
Hi so basically im pretty sure i have all my code right and its compiling but for some reason when i run it the frame will load and then quit on me without saying anything i dont know why here is my code [CODE] import javax.swing.*; import java.awt.event.*; import java.awt.*; … | |
How can we make of the game through Java Means programming games in Java How? please help me guys!!!:'( | |
hey there, I downloaded the jxbrowser package that comes in the following folder jxbrowser-2.8-cross-desktop-win_mac_linux . I put it on a directory JavaBrowser on my desktop. I tried writing a java class that makes use of the package but my compiler complains for absence of the package. anyways, after reading the … | |
Please could someone help with this Project thank you and would also be much appreciated. CD Collection Write a program that stores details of a CD collection. Level 1 maximum 50% (depending on implementation, demonstration, viva and documentation) must include the following: Declaration and initialisation of variables Separate … | |
Hye guys...im trying to create ScrollBar Horizontal on whole frame, i keep trying and do some research but still fail...Please help me...What should i add. This is the code. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class listOfMovies extends JFrame implements ActionListener { private JButton jbtBatman, jbtAngels, jbtFaster, jbtDueDate, jbtHuman, … | |
I have a Computer Science project due Monday. We have to make a game and use GUI in order to ensure ourselves a good score. I decided to make Hang Man. The class reads in a txt file of common SAT words (I'm a sophomore in high school, so I … | |
Hie guys, i am thinking of setting up an sms center which send sms' to subscribers. I would like to know where i can get as much research help as possible about sms centres and how they work. it would really help | |
I am trying to update a JProgressBar in a for loop , The maximum size , I have set is equal to the size of the array which is computed upon and I am incrementing the value of the progress bar in the for loop.Here 's the code [CODE] private … | |
Hello everybody, I have a task to let an engine run. Now I want it to program that it runs once for 60 seconds and then stops. How can I do this? Timer is not an option because it don't need to repeat. Thanks in advance for your answers :) … | |
What is the best edition to learn java in basic.... Eg.. JavaSE JavaEE JavaME or if something else..... Is JavaEE [B]good [/B]for begin or [B]not [/B]? Why? What are the main differences between those editions..... | |
Do you think a hash table is a good data structure for implementing a priority queue? Any ideas? | |
Hi, I have to read and store 70 millions of Double objects in a Vector. The problem is that it seems that Java will allocate 40 bytes of memory for each Double object and the memory amount we need to store such number of Doubles object is approximately 2.8 GB. … | |
| Hi I'm making the mastermind game but using numbers instead of colours. The one part that I'm stuck on is when the right number is guessed but in the wrong position, it seems to count it too many times. for example; generated number: 4234 guess: 2122 real answer should be … |
Hi everyone! i am trying to find the average from an arraylist conatining database values. My database table have 9 columns and has 168 rows. Now i need to find the average at an interval of 12. My database table has time as 1 column and 8 other columns with … | |
Hi. i am using java launcher from 1 year. its a freeware. it says that the edition is expired. i tried re-installing it but it says the same how to fix?? | |
I want a user to enter the query: "select * from books where price > 24.99 and price >= 25.00" for example, but since the statement doesn't need price >= 25.00, I want to rewrite the query to just "select * from books where price > 24.99" and give the … | |
| i was just hoping to get help on an assignment i've been racking my brain over for the last couple of hours. i'm asked to program a database of houses using object oriented programming. i'm suppose to do this by writing a house class, an address class, and a third … |
Hey here's my code for functioning like MS Paint. But JLabels are just not visible. Please Help. [CODE] import java.awt.event.*; import javax.swing.*; import java.awt.*; import java.awt.image.*; public class MSPaint { JFrame frame; JPanel panel; Painting paint = new Painting(); public MSPaint() { frame = new JFrame("MS Paint"); frame.setSize(1024,768); panel = … | |
Hi i'm creating a GUI and i have a couple menu items set up with options within those menus. What I'm looking to do is use those items inside the menus to open up more menus kinda like when you go down to all programs in your start menu and … | |
hello i use eclipse when i add action listener for button it marks as redline iam using swing component what is the problem ?what is the actual problem in that | |
hello I developed a chatting application with GUI. when the TextArea is full and if any new text is added, the JScrollBar will not scroll down automatically. I struggled a lot to make it scroll automaticaly but ended with dashing hopes how to make the JScollBar to scroll down automatically. … | |
I am trying to change the background color of the JPanel every 3 seconds (3000 ms) when I click START button till I press STOP button. [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.Random; class TimerBackground implements ActionListener { JFrame frame; JPanel panel; JButton btnStart; JButton btnRed; JButton btnGreen; … | |
I'm need to set up teams based on how many wins the team has inside this text file : [code] UNCC 30 NCSU 28 GT 25 USC 20 GSU 19 UVA 15 UGA 2 UNC 1 [/code] For example the output of the program should be: [code] UNCC VS UNC … | |
for (count=1; count<=10; count++) { number1= randomNumber.nextInt(10)+1; number2= randomNumber.nextInt(10)+1; Help correct= new Help(number1, number2); switch(choice) case 2: if (number1 > number2) { System.out.print("What is the answer to this problem? " + number1 + "-" + number2 + ":"); ans= keyboard.nextInt();//stops at 2 problems!!!!!! a= correct.getSub(); if(ans == a) { System.out.println("The … | |
i am having a problem to write the code for a project that i have i need to get the label to the picture attached to count how many oval and rectangle are in the picture i have the code for the rest i just cant figure how to arrange … |
The End.