32,204 Topics

Member Avatar for
Member Avatar for abhisheyke

Write a program that evaluates an expression.assume the operands are integers and operators are +, −, *, /. Please help me.

Member Avatar for jon.kiparsky
0
375
Member Avatar for surfdude167

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 …

Member Avatar for stephen84s
0
141
Member Avatar for TinyBelly

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 …

Member Avatar for stephen84s
0
145
Member Avatar for chinee

how do you print out to a text file in tabular form like the soccer teams and their info.

Member Avatar for chinee
0
56
Member Avatar for ayan
Member Avatar for fin4424

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.*; …

Member Avatar for fin4424
0
258
Member Avatar for MSoft

How can we make of the game through Java Means programming games in Java How? please help me guys!!!:'(

Member Avatar for VernonDozier
0
199
Member Avatar for bibiki

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 …

Member Avatar for mKorbel
0
128
Member Avatar for yunus2807

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 …

Member Avatar for JamesCherrill
0
155
Member Avatar for TinyBelly

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, …

Member Avatar for mKorbel
0
205
Member Avatar for laitingfei

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 …

Member Avatar for rebecca94
0
2K
Member Avatar for edensigauke

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

Member Avatar for jwenting
0
159
Member Avatar for ashishnandwani

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 …

Member Avatar for ashishnandwani
0
196
Member Avatar for MeandJava

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 :) …

Member Avatar for MeandJava
0
160
Member Avatar for Sadun89

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.....

Member Avatar for Sadun89
0
130
Member Avatar for coding101

Do you think a hash table is a good data structure for implementing a priority queue? Any ideas?

Member Avatar for Lamthuy
0
140
Member Avatar for Lamthuy

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. …

Member Avatar for Lamthuy
0
157
Member Avatar for TheQuad

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 …

Member Avatar for peter_budo
0
1K
Member Avatar for sumprit

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 …

Member Avatar for sumprit
0
119
Member Avatar for harinath_2007

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??

Member Avatar for ztini
0
86
Member Avatar for NinjaLink

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 …

Member Avatar for ztini
0
118
Member Avatar for die_raupe2

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 …

Member Avatar for ztini
0
218
Member Avatar for guru_iyer

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 = …

Member Avatar for guru_iyer
0
1K
Member Avatar for toferdagofer

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 …

Member Avatar for WolfShield
0
124
Member Avatar for rithish

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

Member Avatar for jon.kiparsky
0
88
Member Avatar for harinath_2007

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. …

Member Avatar for JamesCherrill
0
102
Member Avatar for guru_iyer

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; …

Member Avatar for guru_iyer
0
1K
Member Avatar for Justin9825

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 …

Member Avatar for Ezzaral
0
98
Member Avatar for littlemini

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 …

Member Avatar for jon.kiparsky
0
108
Member Avatar for shyla

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 …

Member Avatar for JamesCherrill
0
270

The End.