36,051 Topics

Member Avatar for
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
162
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
278
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
184
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
216
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
346
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
365
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
266
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
1K
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
133
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
521
Member Avatar for SoulofchaOs

After I clicked the 'Run' button in Netbeans, it will compile and run and then it will stop at this point : [Click Here](http://i.imgur.com/4O8vY2d.png) I will have to press any key on the keyboard then it will display the text, but it doesn't allow the user to enter any form …

Member Avatar for tinstaafl
0
226
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
213
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
134
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
228
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
126
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
895
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
275
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
329
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
340
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
435
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
713
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
134
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
179
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
105
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
182
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
158
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
134
Member Avatar for Neha290791

hey all so there's another problem.. Actually I have a login page in my application. When user login with the appropriate credentials, different screens open up for different purpose. Each screen has a link called SignOut on the top of the page. Whan user logs out, he jumps to the …

Member Avatar for LastMitch
0
147
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
295
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
186
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
300
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
285
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 subratbehera

Friends iam using Struts1.2 and iam new to this framework. Iam stuck at one place. I have fetched the records from oracle database and set it in the arraylist of type(DTO object) which is defined in bean class. Now iam facing problem in iterating through the arraylist in the jsp …

Member Avatar for radhakrishna.p
0
3K
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
181
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
782
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
109
Member Avatar for game06

i have no insert method and still its adding node in linkedlist. code below have no error so you can run to see the problem better. if u run this it will ask u to enter a command. i only have two commands exit and display. display command will print …

Member Avatar for game06
0
176
Member Avatar for tingwong

Hi everyone I am having trouble finding the nth node of a binary search tree in an inorder traversal. I am getting NullPointerExceptions for any numbers other than 2 and 3 and even those print out the wrong values. If anyone could help it would be greatly appreciated. The method …

0
135
Member Avatar for Nandomo

package battleship; public class BattleShip { public static void main(String[] args) { Addons a = new Addons(); Board b = new Board(); Computer c = new Computer(); Human h = new Human(); LinkedList list = new LinkedList(); while(a.intro()) { a.sleep(1); a.countDown(5); b.prepareBoard(); do { h.play(b.getBoard()); a.checkWinner(b.getBoard()); System.out.println("How the Board stands."); …

Member Avatar for stultuske
0
251
Member Avatar for asifalizaman

hi!guys i am very glade to told you that you guys must learn java programing language because i think aproximate one billion devices are running java...so first of all i recommeded you that you guys get the "The complete Java reference book 2"it is the best book for you guys …

Member Avatar for mike_2000_17
-3
579
Member Avatar for liphoso

Hope this is the correct place to put this question. i am new to linux and am runnning ubuntu 12.04. I just installed Netbeans 7.0.1 and xampp 1.8.1, both running on ubuntu. i would like to make a c++ program that uses the MySql database that comes with xampp. I …

Member Avatar for pritaeas
0
95
Member Avatar for saurabh.mehta.33234

public class HelloWorld{ static int a; public static void main(String []args){ System.out.println("Hello World"); HelloWorld h =new HelloWorld(); a = h.foo(); System.out.println(a); } int foo() { try{ throw new Exception(); } catch(Exception e){ System.out.println("catch"); return 9; } finally{System.out.println(a);return 10;} } } When I ran the above code output was: Hello World …

Member Avatar for IIM
0
163
Member Avatar for Kiefchief

How would I put the output is rows of ten? public static void main(String[] args) { int count = 1; int j = 0; // for (the numbers from 100 to 200) for (int i = 100; i <= 200; i++) // if (this number is divisible by 5 or …

Member Avatar for stultuske
0
3K
Member Avatar for shotokanpoloto

I have a java project which is written by JCreator.I've never use JC before(I'm a netbeans user) I installed JCreator and now can't open the project.Maybe I don't know how... There is .project and .classpath files and src , bin and .settings folders.

Member Avatar for stultuske
0
60

The End.