32,199 Topics

Member Avatar for
Member Avatar for Hypnos_16

Hey everyone, i'm currently working on a program that requires a number to be saved outside of the program in some manner and recalled later. Sounds confusing but perhaps this will help. The program i'm making is a game, and i want to be able to create something similar to …

Member Avatar for 117
0
167
Member Avatar for mags11

Hello. I am having a slight problem with layout in my program. The Textfield doesn't seem to be aligned with the Message Label. The program is a GUI MPG calculator. It's supposed to calculate the car's mileage. It's supposed to let the user enter the number of gallons of gas …

Member Avatar for NormR1
0
733
Member Avatar for Stevo812

Hi everybody. I am new to this site and am sure you guys could help me. I am currently writing a pool game using eclipse and need to create an array of objects.I have two balls placed individually onto the screen but I'm not certain how to write an array …

Member Avatar for Stevo812
0
1K
Member Avatar for Mr.BunyRabit

I have a java program whith a mysql database. the user loggs in in the breginning of the system with a username and password. there are some functions that the normal users may not see/use. How do i know who is logged on to my system, since they only type …

Member Avatar for gourav1
0
277
Member Avatar for mkerala

A program to solve the following problem. You can use C, C++, C#, Java or Haskell to code your solution. **The problem** You have a block of platinum that can be exchanged in your bank either for cash or for smaller blocks of platinum. If you exchange a block of …

Member Avatar for thines01
0
1K
Member Avatar for jackbauer24

When I run my bucky.java, the background color is black and not pink. Why? Here is my bucky.java:- import javax.swing.*; import java.awt.*; /** * Created by IntelliJ IDEA. * User: Administrator * Date: 3/30/12 * Time: 3:59 PM * To change this template use File | Settings | File Templates. …

Member Avatar for jackbauer24
0
176
Member Avatar for idlackage

I put a bunch of JButtons in a 2D array into a GridLayout. I want the user to be able to change the size of this grid at run time, but I tried resetting the row/cols, re-adding the buttons, remaking the panel that this grid is in - all to …

Member Avatar for idlackage
0
487
Member Avatar for froggyking

I'm supposed to ask the user for a grade and store that grade for future use and add curves. How do I store the grade and send it to the different methods in the switch statement? Thank you for checking out my question! import java.util.Scanner; // Used for keyboard input …

Member Avatar for NormR1
0
114
Member Avatar for Stevo812

Hi all. I'm currently writing a pool game in java and I'm having trouble making the cue ball move by using the mousePressed(), mouseDragged and mouseReleased() methods of mouseEvents(). When the mouse is dragged a line should appear out of the ball in opposite directions one for the power and …

Member Avatar for NormR1
1
1K
Member Avatar for Syrne

Hi guys, I am toying around with ArrayLists and objects and I created a quick program to add some objects to an ArrayList and print the list afterwards. I ran into an issue, though. I am overriding the toString method in order to display the names of the objects I …

Member Avatar for Syrne
0
156
Member Avatar for CodeMonkeyJunk

This is the criteria i am required to get my program to do. I have looked on google for help but I can't find any. Enhance / modify the program you created in the previous assignment. Create a class ScanArray. This class should have two methods FindMax and FindMin. Class …

Member Avatar for CodeMonkeyJunk
0
412
Member Avatar for Mr.BunyRabit

hey there. (i first posted this question on the wrong forum... idiot.. i know) I want to change the looks of my buttons in netbeans (6.9.1) But when ever i try (when i go to the properties -> icon -> and try to select the images, ONLY a few of …

Member Avatar for Mr.BunyRabit
0
461
Member Avatar for Mr.BunyRabit

Hey there i have a problem with a program that works on other pc's but not on my laptop. (it connects to access) When i try to run it it gives me the error "AAAjava.sql.SQLException:[Microsoft][ODBC Driver Manager] data source name not found and no default driver specified" I already reinstalled …

Member Avatar for Mr.BunyRabit
0
206
Member Avatar for Mr.BunyRabit

Hey there I started coding again on my old project in netbeans but i have no idea what kind of a prject it is, for example, is it javaEE or whatever. like in the image attached. How can i find out what my current project type is? Thanx

Member Avatar for Mr.BunyRabit
0
102
Member Avatar for Mr.BunyRabit

Hey there. Whyy is my netbeans so retarted?! is this a common problem? or is it just with me? Ive attatched two images to show you what it does to my buttons. image one is the actualy program running image two is in the design view Thanx

Member Avatar for Mr.BunyRabit
0
99
Member Avatar for 3nrichedd

hello everyone, I am recieving this compiler error stating that `else if(input%100 || input%10 == rndNum%100 || rndNum%10)` this line ^ gives me the error error: bad operand types for binary operator '||' was hoping someone could explain this error to me if possible, also any advice would be greatly …

Member Avatar for picogenkaku
0
168
Member Avatar for ringo_tech

Hi everbody, in the server side of my project,when i close the socket then try to open it again the following exception is thrown java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind how to solve this without close the whole pogram to enable a client to reconnect to the server?

Member Avatar for ringo_tech
0
177
Member Avatar for DoubleGee

Hello guys, I'm fairly new to Java. I have been asked to create a simple GUI (JLabel, JTextField and 3 JButtons) I have managed to create the GUI but I'm having trouble with making the buttons work. Here is my actionPerformed method: public void actionPerformed(ActionEvent evt) { if(evt.getSource().equals(printButton)) // This …

Member Avatar for 117
0
201
Member Avatar for tabicat91

Ok, so I'm writing a chat client/server and both the client and server are multithreaded to accept user input and read from the socket at the same time. Since it can do both at the same time, I'm trying to overcome the problem of the user typing in a message, …

Member Avatar for NormR1
0
129
Member Avatar for samc36

# Java Conversion Program # Hi everyone reading this. I appreciate you taking the time to even look at my problem. I'm designing a converter app in Java to convert units, km to ms-1, degrees celsius to fahrenheit etc etc.. I have built a basic Gui using the WindowBuilder plugin …

Member Avatar for samc36
0
333
Member Avatar for MxDev

Hi guys, Today I've passed the SCJA exam, but i was wondering if Oracle will send me a certificate to my address proving that i have passed the exam and i'm offically SCJA holder?? Thanks guys

0
51
Member Avatar for MrHardRock

Hey guys, I recently had an assignment to write a sort algorithm we have not yet gone over in class. I had no problem getting my code written and to compile, but now that it compiles I keep getting an error that says "Exception in thread "main" java.lang.NoSuchMethodError: main" I …

Member Avatar for Ezzaral
0
228
Member Avatar for jarograv

import javax.swing.JOptionPane; public class Login{ public static void main(String[] args){ String username = JOptionPane.showInputDialog("What is the desired username?"); String password = JOptionPane.showInputDialog("What is the desired password?"); boolean unlock=false; while(unlock==false){ String usernameinput = JOptionPane.showInputDialog("What is the username?"); if(username==usernameinput){ String passwordinput = JOptionPane.showInputDialog("What is the password?"); if(passwordinput==password){ System.out.println("access granted"); unlock=true; }else{ System.out.println("denied"); …

Member Avatar for jarograv
0
117
Member Avatar for syed30

Hey guys I need to hand in this assingment and actually made an account for this as I know this is one of the best forums so far that I have came across about programing, so it would be awesome if someone could help me out with this. So first …

Member Avatar for Ezzaral
1
500
Member Avatar for jackbauer24

Hey guys, sorry I didn't post for long. Now here I am, with a new issue. Here is my code:- import java.applet.*; import java.awt.*; import javax.swing.JFrame; public class HelloWorld extends JFrame { public HelloWorld() { setVisible(true); setResizable(false); setSize(300, 300); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } public void paint (Graphics g) { g.drawString("Hello World!", 50, …

Member Avatar for JamesCherrill
0
242
Member Avatar for Majestics

at javax.swing.table.DefaultTableModel.setValueAt(Unknown Source) at javax.swing.JTable.setValueAt(Unknown Source) I am setting a table row manually.... its just for checking purpose , i have 10 rows and 10 columns but still i am getting this error, please help me to resolve it....

Member Avatar for Majestics
0
282
Member Avatar for foxy_123

Hi everyone, I'm trying to make a simple application displaying some amount of buttons which has added simmilar but different action. The amount of buttons is not known before compiling because it depends on external data. All the buttons are shown in some container. How did I get it: -creating …

Member Avatar for foxy_123
1
185
Member Avatar for mehnihma

Can you help me with this code, I do not know what is wrong? Thread is stuck somewhere? import java.io.*; import java.util.*; import java.util.concurrent.locks.ReentrantLock; public class Pokemon { private static ArrayList<String> pokemonList = new ArrayList<String>(); private static ArrayList<Thread> threads = new ArrayList<Thread>(); private static ReentrantLock lock = new ReentrantLock(); public …

Member Avatar for mehnihma
0
165
Member Avatar for sadzee

**I am making an Email Parser program. The email should follow following rules: • The prefix or the user-id (i.e. the characters before @) should contain at least 6 and maximum of 15 characters. • The domain name (i.e. the characters after @ and before dot) should contain at least …

Member Avatar for niranga
0
85
Member Avatar for Onlineshade

I have face some problem with java swing component.I need to show at least 200 data in a jtable.But here is the limitation in Jtable to show at most 100 data.How can I solve this problem?? I am using mySQL data base for handling data.So it is too difficult to …

Member Avatar for Onlineshade
0
185

The End.