32,204 Topics

Member Avatar for
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
514
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
Member Avatar for tapandesai007

I am trying to send a SMS from my Java web application using the API provided on this site. I am not able to receive the response code as its mentioned on its tutorial, which can be found here. I am using the Java version of the code for my …

Member Avatar for LastMitch
0
226
Member Avatar for newbie14

We have a java application running on Centos 6.4 what we notice is that the RES is around 370m which is more then the allocated max that is 256m. Does this signify that we the application is leaking? But overall the jstat gcutil does not show any FGC but quite …

0
111
Member Avatar for fatalaccidents

Hello all, I would like to first state that it this is a question for a homework assignment, so I'm not looking for exact code but rather just help on something that is frustrating me. We have to create our own ADTs for this assignment and not use built in …

Member Avatar for somjit{}
0
890
Member Avatar for milkman93

Hey Everyone, I want to instantiate an ArrayList in java. I realize the method to doing this is: ArrayList<String> determiners = new ArrayList <String>(); determiners.add("A"); Where "A" is added to the arraylist once created. However, the problem I'm having is that the .add method doesn't work unless in a main …

Member Avatar for milkman93
0
2K
Member Avatar for thewayoftheduck

**I have some errors in my code and can't figure out how to get rid of them any help is wonderful.** The full code is: import java.util.Scanner; public class FindGeneSequence2 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Please enter a genome for segmentaion into genes: …

Member Avatar for thewayoftheduck
0
271
Member Avatar for thewayoftheduck

import java.util.Scanner; import java.util.Random; public class HangmanGame2 { public static void main(String[] args) { Scanner input = new Scanner(System.in); final String[] WordList = { "porcupine", "flamingo", "sasquatch", "poseidon", "minnie mouse", "mickey mouse", "galileo" }; String ChosenWord = WordList[(int)Math.random()*WordList.length]; StringBuffer display = new StringBuffer(ChosenWord.length()); for (int i = 0; i < …

Member Avatar for IIM
0
321
Member Avatar for bananacat

I've had enough. I just don't get what's wrong at all. I coded a basic calculator program, and it compiled correctly, no exceptions thingy, sooo... it's probably my mistake --- nothing appears on the calculator's GUI. It's a blank window with just the title. And when executing programs like this, …

Member Avatar for bananacat
0
330
Member Avatar for darylglenng

>what do i need to change if i want this program to convert decimal to hexadecimal thanks. package dectooctal; import java.util.Scanner; public class Dectooctal { public static void main(String[] args) { Scanner input = new Scanner(System.in); int broj; System.out.print("ENTER NUMBER THAT YOU WANT TO CONVERT TO OCTAL: "); broj = …

Member Avatar for deceptikon
0
432
Member Avatar for Nagarajan M

Hi friends, I am using java applet that will perform some operations. Now it is independent of jsp or html page. So,if i close an applet my html page remains active and Vice-Versa. What i want to do is embed an java Applet in html page itself. When i click …

Member Avatar for Nagarajan M
0
702
Member Avatar for alaa sam

hi everyone I'm supposed to write a wifi analyzer in java , what are the libraries I need to do it ? also I'm using linux will my work be protable for windows??

Member Avatar for stultuske
0
128
Member Avatar for jmw5598

I'm working on a web application for a class of mine. The assignment is to create a College Services app where students can login and register for classes. Right now I'm working on the login portion and it coded out but I'm having some issue and hopeing I get a …

Member Avatar for jmw5598
0
176
Member Avatar for game06

i have a for loop and inside i have some code. i want to run this code random. i was thinking of using a if statment. for(int i = 0; i < 50; i++) { if(ran.nextInt(50) > 50/2){ //code } } but i want it so its even more random. …

Member Avatar for JamesCherrill
0
103
Member Avatar for saurabh.mehta.33234

I have the following code on threads.I have a doubt that is it possible that any of the two threads created ie one and two will execute the 2nd print statement in run method before the first print statement in it?That is print hello first and then the current thread …

Member Avatar for stultuske
0
180
Member Avatar for solomon_13000

I found some reading materials about factory design pattern (parallel hierarchy) whereby a class in a hierarchy has a corresponding class in the another hierarchy. So I wrote the code as below: package com.factory3; public abstract class Subject { abstract SubjectPlanner createPlanner(); } package com.factory3; public class English extends Subject{ …

0
154
Member Avatar for game06

i have enemy class. and i am createing bunch of them and storing them in arraylist. i am printing them in random places. for(...){ enemy_class = new Enemy((WINDOW_WIDTH/2)+r.nextInt(WINDOW_WIDTH/2), r.nextInt(WINDOW_HEIGHT)); //add in arraylist } the problem is that some times they get create on top of each other. so my plan …

Member Avatar for somjit{}
0
130
Member Avatar for JamesDanny

Hey Guys, i was looking at the post linked below and been trying to solve the issue, however, i have been unable to solve it. [Click Here](http://www.daniweb.com/software-development/java/threads/384109/data-from-text-file-into-jtable) The post says i "MUST create a new Vector for each row" in order for it to work. as mentioned above, i have …

Member Avatar for <M/>
0
280
Member Avatar for blacklooksgood

Sorry guys, im beginner in java. Can you help me with these problems. :/ Problems: 1. a. Create an abstract class named Book. Include a String field for the book’s title and a double field for the book’s price. Within the class, include a constructor that requires the price. Include …

Member Avatar for <M/>
0
2K
Member Avatar for SHAHAB UDDIN
Member Avatar for lauraroxi

Hello. I have to design 2 classes that use a binary search tree for storing some orders for some products. I've researched on the Internet about BST implementations in Java, and I've found TreeSet. Do you have any other suggestions? Thank you:)

Member Avatar for cmps
0
184
Member Avatar for game06

i need some help with binary trees. i belive i have finish with insert and displaying the tree methods. but i can not be sure but i am getting a error in main. error in main: Exception in thread "main" java.lang.Error: Unresolved compilation problem: Cannot make a static reference to …

Member Avatar for JamesCherrill
0
296
Member Avatar for Lamirp

I'm looking to make a single method that takes in my object and spits out a checkbox with an item listener. Here's my relevant portion, the IDE wants me to make my argument and checkbox final prevents the listener from functioning during runtime. Any ideas or help would be appreciated, …

Member Avatar for Lamirp
0
264
Member Avatar for harinath_2007

Hi.. I want to read data from the microsoft access file(.mdb) using my servlet application . I need to read the data in .mdb file and format it to display on the web using my servlet application (or JSP)..How can i read data from .mdb file? I have never worked …

Member Avatar for stultuske
0
2K
Member Avatar for lester.awotwe

Situation: A pet shop contains multiple pets, namely two cats (Fred, Tom), two dogs (Buch, Bravo) and one bird (Tweety). Each pet has a distinct price, a name, and a sound. In Addition, a pet owner can enter the shop and buy one or multiple pets. On entering the shop …

Member Avatar for JamesCherrill
0
179
Member Avatar for SylvanSagacious

Hi all. I'm trying to create a server/client program in java for an assignment. I'm struggling to get the receiver thread working, which I want to do before I implement the more complex features, but I keep tripping up with the receiver. The sender will send the message, the server …

Member Avatar for JamesCherrill
0
776
Member Avatar for hassansayed

4. Write a program that reads a series of integers until the user enters 3 successive negative ones or 4 successive positive ones (Zeros should be ignored and skipped as they have no effects at all). The program then should display the number of changes (from positive to negative and …

Member Avatar for <M/>
0
107

The End.