32,199 Topics

Member Avatar for
Member Avatar for idmanner

Hello Everyone Im trying to call my paint method inside my ball class but cant seem to get it to work.Repaint wont call paint nor update Any help would be greatly appreciated public class Bounce2 extends Applet implements ActionListener,AdjustmentListener, Runnable { //Create and initialize objects private static final long serialVersionUID …

Member Avatar for JamesCherrill
0
279
Member Avatar for Doogledude123

I have a GUI with two JSpinner's and a Spinner Model attached to each of them. When changing one value, the other changes. I suspect this is because I'm using the same model. This is obviously not what I intend to do, is there a better way than creating another …

Member Avatar for JamesCherrill
0
135
Member Avatar for Pobunjenik

Hi! Straight to the problem: I'm building this server application which will monitor SQL databases. I want it to remember any number of connections so I've made a few methods which I thought would do the trick, except they don't. The program should add any new SQL connection to a …

Member Avatar for Pobunjenik
0
387
Member Avatar for Fruits1234

Hi guys I need help creating an unordered list of objects.I am supposed to create a file of name and phone number pairs, such that each name is on a separate line and each phone number is on a separate line. Then I am to edit the Phonetest and phone …

Member Avatar for JamesCherrill
0
172
Member Avatar for game123

Hi, Im slightly stuck with a java project ive been asked to do. The problem is the game is a simon game so I the computer picks a letter randomly and the player has to copy it, if the player picks the wrong letter in the sequence the game informs …

Member Avatar for jwow
0
2K
Member Avatar for Roger_2

i am working on an infix to postfix project and have reached a troubling point. one by one i must extract a string token from the string being inputted to the method infixtopostfix and one by one input them to the front of the deque named postfix. i dont understand …

Member Avatar for Roger_2
0
542
Member Avatar for Sandro_1

How can I sum only the first and the last item in an array list? ex.: list = (300, 450, 150, 800, ...)

Member Avatar for Schol-R-LEA
0
280
Member Avatar for Doogledude123

So, I've written a Custom Binary Format outline but I'm not sure how to translate it to code. I was looking for a few tips on where to get started? Here's my outline. MAPDATA { signature // U24 0x4D, 0x41, 0x50 (MAP) version // U8 0x01 width // U16 (MAX …

Member Avatar for JamesCherrill
0
832
Member Avatar for DeanMSands3

Hi, Guys. I'm calculating the correlation coefficient between two HashMaps of Stock Prices keyed on Dates. However, the Dates do not always line up perfectly. So, I need to line-up the two HashMaps by their Keys. Thus far, I'm creating two ArrayLists of the Dates, doing retainAll between them and …

Member Avatar for DeanMSands3
0
2K
Member Avatar for Rohith_1

i need to connect my PC to Micro controller through Bluetooth,to make it simple my PC will continuously send string to Micro controller depending upon string micro controller performs task ,can this post will be useful to my problem else can u please guide me? Thanks in advance

Member Avatar for peter_budo
0
206
Member Avatar for Leonard_3

Hello my name is Leonard Norwood Jr. I'm doing a little Poker thing right now on my own time for practice, but I have a heck of a problem. I'm making two classes called Poker.java and PlayPokerDriver.java right now, and I'm almost finished by somewhere between initializing the decks I …

Member Avatar for JamesCherrill
0
330
Member Avatar for sanketdomal

Hello Everyone Please share any complete example on protocol buffer with Java.I also need instruction to compile java code which use these protocol buffer (protobuf).

Member Avatar for JamesCherrill
0
189
Member Avatar for malihakhan8

hi i want to convert string binary number to octal.how can i do it?. without using predefined methods in java help me thanks

Member Avatar for JamesCherrill
0
54
Member Avatar for sabata mmoledi

how do I print all elements in an ArrayList?? this my code below. import java.util.ArrayList; /** * Write a description of class PetDatabase here. * * @author (your name) * @version (a version number or a date) */ public class PetDatabase { private String name; private String species; private int …

Member Avatar for stultuske
0
209
Member Avatar for dynamix1022

please help me. can you suggest the easiest system. loaning,inventory, etc i have to do the system asap. for my finals. if do you have a system using JFrame pls can you send it to me <EMAIL SNIPPED> Thank you very much .!

Member Avatar for stultuske
0
118
Member Avatar for akash_6

i need desperate help with this one nested loop program: 123454321 1234-4321 123---321 12-----21 (the '-'s are actually supposed to be spaces)

Member Avatar for TekknoDraykko
0
203
Member Avatar for 0xff

I need to make an app in Java that must add in a database all the files (with folder structure) from a hard drive. I need to add the metadata of this files as well. What it will be the best aproach ? Using SQLite with multiple tables or Neo4j …

Member Avatar for diafol
0
199
Member Avatar for centenond

Hello im a total noob in java, im learning game development, i made this game and when i thought i was finish i tested in another android with a smaller screen and puf all the game was ugly. I started rezing evrything by screen width, example batch.draw(position.x, position.y,Gdx.graphics.getWidth()/7, Gdx.graphics.getWidth()/7 ); …

Member Avatar for centenond
0
337
Member Avatar for sushma_1

I have two textarea in my code.I have a connect button and on click of connect it gets connected to the server. I have a send button. When i type anything in the first textarea and click send button it should be received back and printed in the second textarea. …

Member Avatar for JamesCherrill
0
229
Member Avatar for ruhulaminice

anybody can help me how i can run a java database program code in eclips software i have tried many times but give no result when run this please help me

Member Avatar for Heanre
0
370
Member Avatar for anandhachandru
Member Avatar for errjolli1
Member Avatar for Nandomo

I am sending a file over datagram sockets, all of the packets arrive perfectly fine except the last one, since it does not fill the buffer of bytes when it is sent through the network those bytes in the array which didn't have data now have junk information that corrupt …

Member Avatar for JamesCherrill
0
119
Member Avatar for vivekH
Member Avatar for vivekH
0
183
Member Avatar for logicslab

Hi dear friends, My current problem regarding inputstream value processing . I don't get the block level full value as shown in loop.I got last byte value only cipher.init(cipherMode, publicKey); byte[] encText = null; while ( (bufl = inputReader.read(buf)) != -1) { encText = RSAEncryptUtil.encrypt(RSAEncryptUtil.copyBytes(buf,bufl),(PublicKey) publicKey); } String hexString = …

Member Avatar for Slavi
0
145
Member Avatar for Doogledude123

I'm making a map editor for my game and I'm at the point where I need to save the map to a file. My Maps contain multiple layers though, which will be stacked on eachother for display. I know I could save each file seperately but I wanted these to …

Member Avatar for ~s.o.s~
0
324
Member Avatar for michael.james.90475

import java.io.*; import java.net.*; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.text.DecimalFormat; public class Client { static double difference=0; static int totalTransferred=0; static StartTime timer; static double previousTimeElapsed=0; static int sizeDifference=0; static int previousSize=0; public static void main(String args[]) throws Exception { final int lossRate = Integer.parseInt(args[0]); final String hostName = args[1]; …

Member Avatar for michael.james.90475
0
531
Member Avatar for vivekH

I want convert the .csv file to .arff file can someone suggest what to do? my code is: package csvtoarff; import java.io.File; import weka.core.Instances; import weka.core.converters.ArffSaver; import weka.core.converters.CSVLoader; public class CsvToArff { public static void main(String[] args) { try{ String f1 = "C://Users//user//Desktop//testfold//test.csv"; String f2 = "C://Users//user//Desktop//testfold//output.arff"; // load the …

Member Avatar for vivekH
1
4K
Member Avatar for sabata mmoledi

help please PART 1: Quiz Version 1, simple quiz [100 marks] a) Your Quiz class will need the following additional methods as shown in the instructions in Quiz.java (See sections marked “TODO”). 1. void printQuizClosedMessage() [5] 2. void close() [5] 3. void showAttemptsRemaining() [5] 4. void showSum() [5] 5. void …

Member Avatar for DaveAmour
0
193
Member Avatar for bongumusa

The End.