32,199 Topics

Member Avatar for
Member Avatar for game06

i have a Life class. which just prints a image of heart. i want to have 6 lifes so iam adding 6 classes in arraylist. 1st heart one left. 2nd heart next to it..... int life = 6; //LIFE - create 6 heats and store in arraylist lifeClass = new …

Member Avatar for game06
0
140
Member Avatar for spowel4

Using this example json file: { "stores": [ { "storeName":"AUGUSTA", "company":"CC", "emailAddresses": ["spowel4@gmail.com", "spowel4@yahoo.com", "steve@compsysplus.com"] }, { "storeName":"CHATTANOOGA", "company":"CC", "emailAddresses": ["spowel4@gmail.com"] } ] } I have this code to try to parse the file: public static void main(final String[] args) throws Exception { // TODO code application logic here ObjectMapper …

Member Avatar for spowel4
0
9K
Member Avatar for milkman93

Hey Fellas, I created 10 JTextFields using and ArrayLists: `ArrayList<JTextField> textFArray = new ArrayList<>();` textFArray.add(new JTextField()); gbc.gridx = 1; for (int i = 0; i < 10; i++) { gbc.gridy++; add(textFArray.get(i), gbc); textFArray.add(new JTextField(i)); } What I need to do: I need to get the values of what ever the …

Member Avatar for JamesCherrill
0
292
Member Avatar for game06

i have two classes, enemy class and level class. in level class i am changing the counter value. note i set up my if statment so it will only goes in onces and never again. so if u reach lvl 2 than it will go in lvl2 if statment onces …

Member Avatar for JamesCherrill
0
165
Member Avatar for lauraroxi

Hello! I use the Serializable interface in one of my projects but I have a problem. I serialize some objects and when I try to deserialize them after I run the application several times, the only object that is deserialized is the last one that was serialized. Do you have …

0
83
Member Avatar for StefanRafa0

Hello guys i have started project that i want to translate text from Latin to Cyrillic so i have just this and i dont know how to continue any help will be appreciated - Thanks :) private void TranslateActionPerformed(java.awt.event.ActionEvent evt) { String TextToTranslate = textToTranslate.getText(); char[] latinica = { 'a', …

Member Avatar for StefanRafa0
0
172
Member Avatar for SylvanSagacious

I have created a simple UDP client and server, but I have some problems with how to actually structure the servers operational handling, whether its if Else or case selections. 1.The user sends a Packet to the server, containing a string that they've typed in. 2.The server receives it and …

Member Avatar for JamesCherrill
0
345
Member Avatar for ef_mag

Hi to all, i am newbie in java. I have created a program to read data from excel files with APACHE POI and show them in my console. I am using Eclipse as editor. Now I an trying to import these data in database so I can store them. The …

Member Avatar for stultuske
0
13K
Member Avatar for Violet_82

Hi chaps, what do we define as a client of a class please? I keep reading about "clients of a class" but I don't understand what that means. Maybe it is better to have some examples: take the following 2 files: //Employee.java public class Employee{ public static void main(String[] args){ …

Member Avatar for Violet_82
0
165
Member Avatar for game06

how hard is to learn object-c, if you know java. i want to build online games in java and build apps in object-c. i want to switch between them fast. can you give some idea how same or different are those language are?

0
62
Member Avatar for nah094020

Ok so i have implemented a program that simulates a post offie, but now i cant figure out why my threads arnt join and printing, also not sure why my threads are not interleaving. Anyone care to take a look at my code?, its kinda long thats why i dint …

Member Avatar for bguild
0
127
Member Avatar for trishtren

Hello, Iv recently been having trouble with a java project im working on as i need a button to add a sentence to a Swing list box. The problem im having is it uses an observable class and an observer. Fundamentally the list adds the elements to an array in …

Member Avatar for trishtren
0
205
Member Avatar for Frensi

Whenever I try to run this nothing happens. Does anyone know what's wrong? package hobbits; public class Hobbits { String name; public static void main(String[] args) { Hobbits []h = new Hobbits[3]; int z = 0; int x = 0; while (z < 4){ h[z] = new Hobbits(); if (z …

Member Avatar for thepastimer
0
199
Member Avatar for bobrown101

Hey guys, I'm making a hangman project just for fun, and i was wondering if you could help me. * I have 5 classes * class 1- main (basically controlls everything except recognizing where the letters are located in the word and printing the hangman picture) * class 2- char_array …

Member Avatar for somjit{}
0
392
Member Avatar for yazz110

Ok so I'm using a buffered reader to read a file and it works alright but my problem is I have integers in this file I have to find and place into an array and I don't know how to do this(feel so stupid). I'm trying to work on a …

Member Avatar for yazz110
0
283
Member Avatar for pheonixkid

Sorry for my poor english as i'm not a native english speaker and writer, but i have written a code which calculates big numbers, adding subtracting and multiplying. when multiplying, adding and subracting numbers, it works, but when i try adding 0 to 0 or subtracting 0 to 0 or …

Member Avatar for pheonixkid
0
275
Member Avatar for riahc3

Hello Im trying to send a HTML email but I want to encrust into the HTML a image without it being a attachment. The content of the email is pure HTML so in order to do img src it needs to be a live link AFAIK. If it can be …

Member Avatar for riahc3
0
159
Member Avatar for toldav

Hi, I'm having issues with driver class is giving me issues. The code needs 2 for loops requirement. The driver class will create an array of 3 CircusClown objects. Use a loop to get user input for your 3 objects. Use a loop to print the toString() method of your …

Member Avatar for toldav
0
275
Member Avatar for inaxassan

I need help with implementing grow and shrink Here is the actually instructions---> •grow(). This method, when called, will “grow” arrayStack by utilizing the strategy outlined in 2 above. This method will only be called by push(). Note that grow() should be private. •shrink(). This method, when called, will shrink …

Member Avatar for JamesCherrill
0
182
Member Avatar for BrackishWater

My team has been doing Java for a long time. We are switching to Ruby. We are finding that Ruby has limitations and that we have to do certain things in Java. I'm trying to find a way to call Java code from Ruby. I'm searching Google and such, and …

Member Avatar for marcnaweb
0
210
Member Avatar for Shania_01

Hello, i'm trying to add some values in the database (ms access) but i am having the following error: Error:java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Can somebody help? Here is my code: package db_con; import java.sql.*; /* * To change this template, …

Member Avatar for jwenting
0
345
Member Avatar for jithinjohny

which is better for a noob programmer ? netbeans or jcreator? or any other ? please help me thanks in advance

Member Avatar for jwenting
0
1K
Member Avatar for dasdgfds

Hi I am trying to create a GUI game where you slide your player to obsticals in order to get to the middle. The basic assignment rules are as follows The world should be represented using a 5 x 5 grid. Empty spaces, obstacles, the destination, and the player should …

Member Avatar for JamesCherrill
0
360
Member Avatar for HankReardon

Hello, Would someone be willing to take a look at this segment of code? I am trying to figure out how this segment of code operates. I can see how the program can evaluate a simple prefix statement like + 7 6. I cannot see how the program can solve …

Member Avatar for HankReardon
0
260
Member Avatar for hbhatti18

This is what I am required to do using basic java programning, I am very new to this and was wondering if someone could help me out from what I have read in my book I am suppose to use if else and decision statements. What O dont understand is …

Member Avatar for thanatos2
0
993
Member Avatar for digrev01

i am pretty new to java i wrote this code but setText doesnt work i mean i cant reset the contol after type a value .what is wrong friends [CODE] private void jTextField1KeyReleased(java.awt.event.KeyEvent evt) { String gelen=jTextField1.getText(); Random rnd=new Random(); int secilen=new Integer(rnd.nextInt(3)); if(Integer.parseInt(gelen)>secilen){ jOptionPane2.setBackground(Color.GREEN); jOptionPane2.setMessage("Girdiğiniz sayı "+gelen +"\n Benim …

Member Avatar for stultuske
0
131
Member Avatar for tricket_7

I am supposed to create a binary tree using strings typed in by the user, to build a balanced tree using recursion. When I type in letters: A, B, C, D, E, F and the output is set up for preorder output, what I am getting is:A B D F …

Member Avatar for tricket_7
0
9K
Member Avatar for ellosbibu

https://www.dropbox.com/s/twtl38huxeeetsx/ProgettoApachePoi.rar in this link there is my project, i create a java text editor for open docx documents. the text editor should do the basics functions of a text editor, as copy, paste , select all, delete, exit, new, open , save and save as. i tested the code and …

Member Avatar for deltascrow
0
512
Member Avatar for cheesy_ninja45

Okay, so I'm in Progromming 2 for school and I was working on Array List and the next lessons just tells you to use the Fibonacci series. Now it was never mention in any prior lessons or semesters and I'm not exactly sure what it is. I know it has …

Member Avatar for somjit{}
-2
201
Member Avatar for kelay

could anyone please help me write a program which accepts an age and throws an exeception if(18>age>22).

Member Avatar for somjit{}
0
131

The End.