32,199 Topics

Member Avatar for
Member Avatar for sidra 100

i have jst started programing in java m beginer. m making gui which contains a two radio button a slider and a text message. although its compiling coreectly but it doesnot display any thing [CODE]import java.awt.*; import javax.swing.*; import java.awt.event.*; public class GUI { JFrame frame; JLabel coord; JRadioButton Man=new …

Member Avatar for hfx642
0
125
Member Avatar for tnimblett

Hi, I don't really have a programming issue rather a artistic issue. Look at the following code of the front view an unfinished building. I'm trying to add a side view to the right or left. I just can wrap my mind on how it is supposed to look. [CODE] …

Member Avatar for tnimblett
0
98
Member Avatar for sidra 100

i m a begginer m making a GUI which consist of a slider and 2 radio button and a text message. i have not added the functionality in it yet. but its not displaying GUI it completes successfuly but at runing time it gives error Exception in thread "main" java.lang.IllegalArgumentException: …

Member Avatar for NormR1
0
92
Member Avatar for KWhite

boolean robotsAlive[]; int robotCount; public int deadRobots (int robotCount, boolean robotsAlive[]) { int deadRobots = 0; boolean robotsALive = true; for( int i = 1; i > robotCount; i++ )//a for loop to loop through the array { //inside the for loop if( robotsALive[] == false ) //and if statment …

Member Avatar for JamesCherrill
0
182
Member Avatar for angeriel1

how can I use JList object in place of JFilechooser show the directory content.any tips or somthing to help me understand this will be apreciated. [CODE]// Display directory content in a JTextArea object. // The user selects a directory via JFileChooser object. import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; …

Member Avatar for JamesCherrill
0
152
Member Avatar for CSloan7597

Hey everyone. I have recently decided to try and learn how to use java Sockets for client/server communication, as well as swing and threads, etc. and have (pretty much) completed a small client server application. The application is basically a syntax-highlighting notepad, a client swing GUI which connects to a …

Member Avatar for CSloan7597
0
289
Member Avatar for mehnihma

Can you help me how to convert this for loop to Enhanced For-Loop? Thanks [CODE] for (int x = 0; x < grade.length; ++x) if (grade[x]==grade1) { gradesum = score [x] * testscore1; }[/CODE]

Member Avatar for masijade
0
141
Member Avatar for elijah11

Hey, Im new to programming and I would like some help , and just to introduce myself to the community, Im looking to learn java, or whatever is recommended for beginners. All the experience i've had is making a Hello world app, some compiling , and etc.

Member Avatar for JamesCherrill
0
38
Member Avatar for xiangzhuang

Hey guys, I have this HW for school for Java but I just can't seem to figure it out. I know I have to use a for loop for it but I just can't seem to figure out everything else. Thanks :D public int factorial(int n) { }

Member Avatar for JamesCherrill
0
423
Member Avatar for techgeek420

I'm working on a program that calculates the day of the week for dates in history or the future. I have the calculation part correctly but there are 4 errors left that I do not know how to fix. Any help will be greatly appreciated! Thanks [CODE]import java.util.Scanner; public class …

Member Avatar for shootingrubber
0
152
Member Avatar for tygergyrl

I am having trouble in sorting out what i need to do for my first assignment. open a text file, with colon char, 1 student number: 2 student name: 3 5 fields with marks; a algorithms: b mathematics: c java: d C++: e scripting open txt file read open txt …

Member Avatar for solomon_13000
0
239
Member Avatar for mohamed moamen

i use speech synthesis javax.speech.synthesis for the first time my program is simple that's say string "hello world" but that not work and give me that Exception: java.lang.NullPointerException at soundreal.HelloWorld.main(HelloWorld.java:20) and i don't know what that mean help plz [CODE] package soundreal; import javax.speech.*; import javax.speech.synthesis.*; import java.util.Locale; public class …

Member Avatar for stultuske
0
103
Member Avatar for ali11

Hi i m creating simple rpn calculator.I m getting following errors. C:\Users\Hamza\Pictures\CalcGUIPanel.java:63: array required, but java.lang.String found cStack.push(buttonOrder[i]); ^ C:\Users\Hamza\Pictures\CalcGUIPanel.java:213: currentValue is already defined in actionPerformed(java.awt.event.ActionEvent) BigInteger currentValue = new BigInteger(cStack.pop()); ^ C:\Users\Hamza\Pictures\CalcGUIPanel.java:215: operator + cannot be applied to java.math.BigInteger,java.math.BigInteger resultValue += currentValue; ^ C:\Users\Hamza\Pictures\CalcGUIPanel.java:223: currentValue is already defined in …

Member Avatar for NormR1
0
265
Member Avatar for vjames

Is it possible to write to an existing text file in a jar. I managed to read from it with getResource() but I am stuck trying to write to it, it gives me a file not found exception. Thanks

Member Avatar for vjames
0
1K
Member Avatar for emmas4impact

I am working on a moving object. so I created a menu bar for size and speed, the idea behind it is that each time small, big or medium is clicked it should change the size and same also applies to the speed but when implement the action listener its …

Member Avatar for emmas4impact
0
205
Member Avatar for rlhh

[CODE] statsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ //Return the string "stats" to gameLoop() as cmd } }); [/CODE] [CODE] public void gameLoop(){ Scanner lineScanner = new Scanner(System.in); cmd = ""; System.out.print(getBoard().printBoard(false)); while (!cmd.equals("quit")) { System.out.print(">"); Scanner wordScanner = new Scanner(lineScanner.nextLine()); if (wordScanner.hasNext()) { cmd = wordScanner.next(); if (cmd.equals("board")) { …

Member Avatar for mKorbel
0
215
Member Avatar for jalpesh_007

I have posted one code. please help me i can't get msg at mouse pointer. please tell me how can i get label at the co-ordinates where the event has taken place. also tell what is the problem with code..it gives output after minimizing and maximizing. hope for reply. Thank …

Member Avatar for mKorbel
-1
206
Member Avatar for xiangzhuang

Complete method called characterCount below so that it returns the number of times the character ch appears in the string s. [CODE] public int characterCount(String s, char ch) { } [/CODE] I know that I have to use a for loop and use s.length() as a stopping point. Other than …

Member Avatar for stultuske
0
132
Member Avatar for chriswinter

I am a begining software engineer in college and have been stumped by a small problem. The assignment is to "encrypt" any text entered. All we have to do is make capitals lower case and vice versa, additionally we have to make a's z's, b's y's and so on. //import …

Member Avatar for hfx642
0
152
Member Avatar for javaNooblet

Hi all, I have a main GUI class as seen here: [CODE] import java.awt.*; import javax.swing.*; import javax.swing.border.*; /* * Class is to communicate with various other classes in the program to * create a roster for user based on their selection on GUI. */ public class MainGUI extends JFrame …

Member Avatar for stevanity
0
259
Member Avatar for pikalife
Member Avatar for sidlampard

hi could anyone tell me how to get bit pattern of a negetive number. For example bit pattern of -1357 is: 11111111111111111111101010110011 and bit pattern of 1357 is: 00000000000000000000010101001101 but how????

Member Avatar for stultuske
0
146
Member Avatar for iXmerof

Hi, I'm making an app that uses Collections. Everything went ok until now, what I've done: I've got a class that initializes 3 strings, those strings are private, so I have made 6 public functions that sets or reads values from those strings. Next I've made a hashmap, keys are …

Member Avatar for iXmerof
0
145
Member Avatar for gopikrish

I am trying to publish my ear and war modules into Oracle weblogic portal 10.3.0.0 server using workshop. I am using pointbase DB. But publishing failed since I was getting the following error, weblogic.application.ModuleException: Exception preparing module: EJBModule(netuix.jar)Unable to deploy EJB: ProxyPagePersistenceManager from netuix.jar: Exception while attempting to deploy Security …

0
76
Member Avatar for pro_learner

Guys,i want a small help from you.I have a created a database in MS Access and now i want to connect it to with Java Application by using ODBC Administartor.But when opens it,it doesn't show any driver for MS Access DBs.Do u guys know any driver for that.I'm using Windows …

Member Avatar for pro_learner
0
199
Member Avatar for sdragon

Hi Everyone, I'm new here and also new in using Java. I want to make an iterator without using the default methods hasNext, hasPrevious. Here is what I've already done using the default methods: [CODE]import java.util.*; public class HomeIterator{ public static void main(String[] args) { int i = 0; ArrayList …

Member Avatar for sdragon
0
269
Member Avatar for eLu-sive

hi, please help me debug this, i am trying to add one row from one table to another at the same delete it from the table i am getting it from. (cut and paste kinda thing). Only one part works, i can only copy and not delete. [CODE] int recordAffected …

Member Avatar for eLu-sive
0
236
Member Avatar for javaNooblet

Hi all, If I write a java program inside of eclipse, how can I run that program outside of it, rather than just hitting the run button in eclipse. So, I can give others the program to run on their computers. Thanks!

Member Avatar for javaNooblet
0
254
Member Avatar for mbrcarnation

Hi everyone, I'm working on a project for my computer science class and we're supposed to make a java applet game. I'm not very far in the game quite yet, but I'm trying to make sure that the mouseListener and the rectangles work before I continue on with the game. …

Member Avatar for emmas4impact
0
228
Member Avatar for emmas4impact

Hi everyone, i'm trying to make a sound each time a ball touches the lift and right of a frame but when i use clip and try to use the sound class it sound from right then left the in middle and then stop. i Can really use some help. …

Member Avatar for JamesCherrill
0
206

The End.