36,051 Topics

Member Avatar for
Member Avatar for mikewyatt

Can someone point me in the right direction? I have a java program created in netbeans that has several tabs that contains various text fields, boxes and such. Over top of these I have a jlable that displays a jpg, or other graphic file that is used for a background …

Member Avatar for mKorbel
0
86
Member Avatar for Viped

Hi, I am trying to make my own paint program. It uses canvas where user draws. How can I get image representation out of that canvas as bufferedimage so I can save it with imageio.write?

Member Avatar for JamesCherrill
0
424
Member Avatar for Mas49er

I have a class project where we must create a program that takes 5 grades of a student that the user inputs and stores them into an array and then gets the average of the 5 grades for example Grades = 92 89 99 78 96 And then stores those …

Member Avatar for richieking
0
241
Member Avatar for mez.ali.779

I m stuck in some jsp programing issue. I'm working as temp web-admin for my friend who is one vacations. I'm managing his freelance web-designing website. Over the weekend i was told by my friend ; to make changes in the login.jsp page and do some programing to log user …

Member Avatar for anand01
0
133
Member Avatar for bipi09

hi, someone can give some example on how to update option and radiobutton value into database :(

Member Avatar for anand01
0
56
Member Avatar for Seswing142

For my class we need to create an Ascii drawing with at least 3 nested loops and 3 different type of loops. this is what i have so far ( just 2 lines of the drawing) for(int i = 0; i<=4; i++) { System.out.print("0"); } for(int i = 0; i<=13; …

Member Avatar for Seswing142
0
294
Member Avatar for taylor.mitchell.353

I’m not sure why this isn’t working. Java isn’t giving me an error I have this in my StateController class public void insertLinks() { for(int index=0; //index is a local variable for state objects index < numStates; index++) //for loop to continue making state objects stopping at numStates(50) { myList.insertFirst(myStates[index]); …

Member Avatar for dimasalang
0
373
Member Avatar for anisha.silva

Hi, i am not sure whether this topic would go under this category, thought this would be more suitable what are the famous software architectures? i have to do an research on this an present, I am new to this topic appreciate a reply thanks

Member Avatar for <M/>
0
200
Member Avatar for Yoink

Hi, I'm concentrating on getting my card and deck classes for a card game project working correctly. Both my card and deck classes are working technically correct but when I go though my nested for loop in my Deck class to create a deck of cards it ends up being …

Member Avatar for Yoink
0
280
Member Avatar for Yoink

Hi, I have to write a program that plays out a whole game of the card game WAR. I have to create a bunch of classes that go along with some pre written classes so right now im trying to start out small and work my way up. We are …

Member Avatar for Yoink
0
692
Member Avatar for khalidshakar

package vc_client1; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.Socket; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.Mixer; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; public class voiceReceiver { public Thread playThread; boolean stopCapture = false; static ByteArrayOutputStream byteArrayOutputStream; AudioFormat audioFormat; static TargetDataLine targetDataLine; AudioInputStream audioInputStream; BufferedOutputStream out = …

Member Avatar for khalidshakar
0
307
Member Avatar for khalidshakar

What is the way that need to be implemented in java to make a server broadcasts a voice to multiple clients, instead of broadcast voice only to one client? for example I am doing a server which can broadcast voice to multiple clients at the same time, now my server …

Member Avatar for khalidshakar
0
533
Member Avatar for gcclinux

Gents as you can see I have done great progress in getting the last line and the line beforelast working and spliting but I am stuck now as I need to the beforethat (3rd) line from last also included and I can't figure it out, everything i do fails to …

Member Avatar for Taywin
0
265
Member Avatar for Julie29

Hi, can anybody help me with this? I am doing an Introduction to Programming module using Java and am stuck at this question. Write a program which reads in a username and a password, and expects the username to be "brian" and the password to be "spam". The program should …

Member Avatar for JamesCherrill
0
7K
Member Avatar for applepie-0167

help i cant figure it out. Write a program that defines and instantiates a new String object called title with COMPUTER PROGRAMMING in it. Then create a new String labeled title2 -- write code to store the contents of title into title1 in reverse order. Using a for loop and …

Member Avatar for Taywin
-1
112
Member Avatar for slimergan

Hi, I am doing a project on creating a traffic simulator for a particular road junction in java. I am looking for ideas on how I would go about recreating the visual of the junction in which I can have moving cars on. Would I use Graph with nodes or …

Member Avatar for JamesCherrill
0
1K
Member Avatar for OsaidAz

so I have a 2D arry with defaul value 0, and what I want to do is to accept a value from a user to change 0s to 1s depending on the accepted value. for example: we have an arry like this 0000 0000 0000 0000 and the user enters …

Member Avatar for OsaidAz
0
146
Member Avatar for randmateweb

Recently I learnt java as a crash course in a private institue they covered me core and advanced core concepts in java for the version 1.6. Since the lastest version is java 1.7, so which book I should follow for my further improvements to become an ideal Java programmer.

Member Avatar for JamesCherrill
0
141
Member Avatar for abinaya.lingam

hi i need to convert my comma seperated text file in to a two dimensional array and i should be able to access each element in that array....i tried so many programs based on read line and split functions but i didn't get the proper output....please help me to do …

Member Avatar for JamesCherrill
0
367
Member Avatar for if10066

Hi, all. I've got task about Natural Language Processing. Usually called NLP, is a technique to process natural language/people word became information for some needs. That's I learn about so far. I wonder if somebody can help me in NLP using Java programming language. If there some references or books …

Member Avatar for Lucaci Andrew
0
170
Member Avatar for rahul.ch

class Account { Long accNum, pwd} public class Banker { public static void main(String r[]) { new Banker().go(); // do more stuff } void go() { Account a1 = new Account(); a1.accNum = new Long("1024"); Account a2 = a1; Account a3 = a2; a3.pwd = a1.accNum.longValue(); a2.pwd = 4455L; } …

Member Avatar for rahul.ch
0
235
Member Avatar for rahul.ch

<? super Animal> means animal or it's superclass only. Then why inside the method it's allowing to add Dog object even though it's a subclass of Animal? This program compiles and runs! import java.util.*; class Cat {} class Animal{Animal() {System.out.println("Animal constructor");}} class Dog extends Animal{Dog() {System.out.println("Dog constructor");}} public class GenericDemo5 …

Member Avatar for rahul.ch
0
338
Member Avatar for NewGuy2Prog

So i am seriously in need of help from someone or everyone on improving my program and any corrections if needed. I have listed my codes below and i am hoping to receive input, suggestions, corrections, and advice. Please remember, i am new to programming so please for those of …

Member Avatar for JamesCherrill
0
175
Member Avatar for Darshan5

Can anyone tell me how to use Java Keylistener to add validations in my java gui form?? eg. I have a textfield. I want to enter only alphabets in it. I dont want any numerics. So when a user tries to type a numeric value in it, I want to …

Member Avatar for JamesCherrill
0
189
Member Avatar for ownedbynothing

this is Sudoku.java this is the main class. Reminder does the time keeping, the SudokuBoardDisplay displays the board and draws images. The one who handles the logic is the SudokuModel How do I make the images clickable and do something. how to display the remaining time as JLabel ....? i …

Member Avatar for mKorbel
0
600
Member Avatar for akosivivas
Member Avatar for dimasalang
0
97
Member Avatar for liphoso

is it possible to have my cellphone send periodic text to another phone stating the location (GPS)? concider: Assume i have lost my phone and would obviously like to have it back. is it possible to design an application that will periodically (automatically say after 60 mins passes) send a …

Member Avatar for dmanw100
0
118
Member Avatar for Murphyv10

Howdy guys need help changing , from string to a big decimal for my addition method in my calculator , i understand the problem but not the solution . Any help would be great, thanks. public void add() { BigDecimal oneNumber = model.getDisplay(); BigDecimal twoNumber = model.getDisplay(); BigDecimal result = …

Member Avatar for NormR1
0
196
Member Avatar for utchia

Hi i am trying to write a search function and the question i have is this, when i do something like this comix[0] = new Comic("book title", "Author", "isbn", 454.24F); for (int i = 0; i < comix.length; i++) { Scanner console = new Scanner(System.in Scanner console = new Scanner(System.in); …

Member Avatar for Taywin
0
236
Member Avatar for Rami Sohail

hello everyone need help with my program this is a airplane seating program for reservations it's a 2d array of 000 .. and when i take a seat it changs to 1 we have first class supposed to be first 2 rows and rows 3 to 7 are business class, …

Member Avatar for Taywin
0
4K
Member Avatar for gorgoro

I want to start as junior in Java in a company but they ask me to present them some tasks that ensures that i am more than a junior.they offer me a task to create a Swing Gui with buttons and stuff.I have already a good knowledge of Java from …

Member Avatar for gorgoro
0
269
Member Avatar for lj81

Hi all, I'm am very close to finishing my 2 player pool game with only a couple of rules left to add. I am currently trying to assign a ball colour (red or yellow) to the player who pots the first ball. I am at a loss at the minute …

Member Avatar for lj81
0
265
Member Avatar for babi.meloo

I need to design an application that determines and prints the number of odd, even, and zero digits in an integer value read from the keyboard. This is what I have so far. public static void main (String[] args) { int odd=0, even=0, zero=0; Scanner scan = new Scanner(System.in); int …

Member Avatar for NormR1
0
3K
Member Avatar for KarimFawaz

Hey guys, im new to programming, just took my first course in university. I'm currently trying to program a calculator that does multiplication, but its giving me this error: C:\Users\Karim\Documents\Karim.java:9: error: package Java.util does not exist import Java.util.Scanner; And ofcourse followed by a few other related errors. Anyone know how …

Member Avatar for stultuske
0
467
Member Avatar for babi.meloo

//**************************************************************************************************** // Project15.java Author: Lewis/Loftus/Cocking // // Write an application that plays the rock-paper-scissors game against the computer. When played // between two people, each person picks one of the three options at the same time and the winner is // determined. The program should randomly choose one of the …

Member Avatar for Taywin
0
4K
Member Avatar for KarimFawaz

Hey guys, im new to programming, just took my first course in university. I'm currently trying to program a calculator that does multiplication, but its giving me this error: C:UsersKarimDocumentsKarim.java:14: error: missing method body, or declare abstract public static void main(String[] args); Anyone know how to fix it? :( import …

Member Avatar for JamesCherrill
0
187
Member Avatar for Blax

Hello, I am currently working on a school project and ran into a little bit of trouble. Every time I compile the program I get 2 errors they are: cirlce.java:23: incompatible types found : java.io.IOException required: char letter = get.ioException(); ^ cirlce.java:37: possible loss of precision found : double required: …

Member Avatar for stultuske
0
287
Member Avatar for oneoderja

Modifty the Cash Register Class to create a file containing a sales receipt. The program should ask the user for the quantity of the items being purchased and then generate a file with contents to similar to the following: SALES RECEIPT UNIT PRICE: 10.00 QUANTITY: 5 SUBTOTAL: 50 SALES TAX: …

Member Avatar for stultuske
0
294
Member Avatar for sharlynjm

Hi all, i want a simple java code to convert currency to indian rupees...how to proceed?

Member Avatar for stultuske
0
123
Member Avatar for Marty1963

I wasn't able to get any response from my last post, so I'm rewording my question with hope that my question is easier to understand. I need to get a visitors location and display a custom header graphic based on the *Region* returned. For example: I live in Edmonton, in …

Member Avatar for chrislim2888
0
153
Member Avatar for bharatgs7

Guys, I just want to know whether is there any way to give a security to the webpages hosted in server. For example, I have hosted jsp application using tomcat. I want to prevent someone from copying those files from tomcat in my computer(Maybe from C Drive). Anyhelp will be …

Member Avatar for JorgeM
0
138
Member Avatar for WDrago

All, I am using Netbeans 7.2 to build a form. I added a Swing JTextArea to my form and all is well. I'd like to add a titled border to my JtextArea (or the JScrollPane in which it lives) but can't figure out how. I tried Right Click > Properties …

Member Avatar for WDrago
0
354
Member Avatar for oneoderja

I want to modify the Cash Resigter Code below to create a file containing a sales receipt. The program should ask the user for the quantity of items being purchased, and then generate a file with contents below: SALE RECEIPT Unit Price : $10.00 Quantity: 5 Subtotal: $50.00 Sales Tax: …

Member Avatar for stultuske
0
3K
Member Avatar for Gen.Asura

Hey, I posted earlier about arbitrary expressions and I did find solution to that. The question is how do I create random expressions? So far I've created codes to generate random operators and random numbers, how will I generate random expressions? E.g. a1,a2,a3 are variables for random numbers I've assigned …

Member Avatar for JamesCherrill
0
175
Member Avatar for Beastegargoyle

Hello, I am currently writing a card game in Java. My question is when I write the follwoing code below: `Inline Code Example Here` 38 // select a random number between 0 and 51 39 int second = randomNumbers.nextInt( NUMBER_OF_CARDS ); Will the program properly generate 52 cards? Should I …

Member Avatar for NormR1
0
321
Member Avatar for kupogu

write a Java program that allows the users to enter in any number of non-negative integers, whitespace delimited. The user terminates the list of numbers with a negative integer. The program then should print the average of non-negative numbers entered.

Member Avatar for JamesCherrill
-1
55
Member Avatar for KronoAngel

I am not to sure what the error is in my code but the order variable does not seem to initialise properly and hence my gui displays the wrong output, for example when cheese,tomato and chicken are selected it only displays Chicken with Tomato Tomato $12.75. Any help will be …

Member Avatar for stultuske
0
323
Member Avatar for ibthevivin

I'm totally lost. I have a programming partner and this is what he sent me. I can't get the program to compile. I don't know where to start. Any suggested place to start? package Assignment2; public class TooBigException extends Exception { private static final long serialVersionUID = 1L; public TooBigException(String …

Member Avatar for NormR1
0
269
Member Avatar for Chuckleluck

This might be a general math question, so excuse me if it doesn't belong here. I have an airplane that flies around the screen. Pressing the W key will make it counterclockwise, and pressing the S key will make it rotate clockwise. When I press space, it shoots bullets. However, …

Member Avatar for Chuckleluck
0
156
Member Avatar for nsharif

I would like to know what tool/class should I use to create a map that used for games? such example: user use key to move an object...and if moves then the more map will shown ... I admit, I did not do much research on this.. but I wanted to …

Member Avatar for nsharif
0
110

The End.