32,204 Topics

Member Avatar for
Member Avatar for riahc3

Hello This is a demo showing Java interacting with Daniweb's new API ( http://www.daniweb.com/api/documentation ) You introduce a member's name and it should show you the total number of posts he has made. Demo is a proof of concept: No bug checking, error checking, etc is in this code. In …

Member Avatar for peter_budo
4
874
Member Avatar for Cyairak

import java.util.Random; import java.util.Scanner; public class RandomDeck { String suit[] ={"Diamonds" , "hearts" , "spades" , "clubs"}; String face[] = {"A" , "Two" , "three" , "four" , "five" , "six" , "seven" , "eight" , "nine" , "ten" , "jack" , "queen" , "king"}; String cards[] = new String[52]; …

Member Avatar for JamesCherrill
0
141
Member Avatar for mjbor1

hello i am working on a simple panting project that allow the user to select a shap from ComboBox then draw it on the panel but problem is when is choose any type of shapes and drawing it on panel no shape appear on the panel ?! here is my …

Member Avatar for mjbor1
0
305
Member Avatar for Maryooma1

1. Given a length of wire P units long, where P is an integer, it is possible in some cases to bend the wire into an isosceles triangle(with two sides equal) where the lengths of all the sides are also integers. For example a wire of length P = 3 …

Member Avatar for JamesCherrill
0
199
Member Avatar for Dane2259

I once did a project in a class that connected to a mySQL database, but now I'm using the jGRASP ide on a mac and the class files won't compile properly. In the project we added the files: Connection.class, ResultSet.class, Sql.class, and Statement.class to the directory (assuming it's the middleware). …

Member Avatar for jwenting
0
131
Member Avatar for DarkLightning7

Ive been working on pathfinding algorithms for a couple weeks now and A Star has me stumped. Right now i am attempting to Pathfind over a maze in a matrix of the form boolean map[x][y][5]; where index 0-3 are the walls on the cells starting on the right with 0, …

Member Avatar for DarkLightning7
0
268
Member Avatar for london-G

Hello, I have a set of fields which I need to save into my database, my problem is that the format with java and mysql doesn't match. I converted everything to String which works but I need to store the data as Date. As I will need to retrieve information …

Member Avatar for kieuvantruyen
0
4K
Member Avatar for xxwikkixx

Hey everyone I was programing a small game and I am trying to figure out how to send an int value to a class and return a String from it. This is my code: This is my main.java class public class GamGUI { /** * @param args */ public static …

Member Avatar for riahc3
0
316
Member Avatar for bibiki

hey there everyone. I hope you're all well. Alright, I am working on testing a project using Selenium. I know that this is a Java forum and not a Selenium one, but I am used to using this one so I am starting here. Plus, I am very confident that …

0
74
Member Avatar for cisumma

I am learning to build.xml a project with eclipse ide. below is the MANIFEST.MF that I am creating. The build shows that the manifest is being written in the dir structure below. The dir META-INF (sibling to the src) contains this MANIFEST.MF [code] Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.1 Created-By: …

0
84
Member Avatar for andymarin

Hi guys, I'm having trouble with my code and I'm kind of new in Java so I don't know what to do. I have to do a program with Buttons and each button has to take me to another class (I don't know if I'm being clear). For example if …

Member Avatar for andymarin
0
706
Member Avatar for revolter00

hi folks, i want to develop a desktop application which will continuously receive text commands from a connected mobile device, via bluetooth rfcomm protocol. i went through hundreds of code examples, including jsr-82 bluetooth & obex api demos; but cannot get what i wanted. one of the popular examples that …

Member Avatar for meghana.Nlknt
0
1K
Member Avatar for rickdeckbar10a

Just some information about myself. I am a 42 year laptop technician returning to college majoring in an Application Development associates degree program at community college starting this summer 2013. I really need some information from the experienced programmers who have been in the job market market for a while. …

Member Avatar for rubberman
0
202
Member Avatar for angeeb84

I have been stuck on this problem for a while. I can't figure out why it is skipping over the last part of my program where it starts double totalMoviePrice. Here is what I have: import java.util.Scanner; public class OnDemandMovieHits_AngelaBrasley { public static void main(String[]args) { String[] movieName = new …

Member Avatar for angeeb84
0
328
Member Avatar for Varunkrishna

Is the following Code correct, for calculating Decimal to Triskaidecimal and Triskaidecimal to Decimal, I hope this code is not right import java.util.Scanner; public class converter { /* 1) Decimal To Triskaidecimal 2) Triskaidecimal To Decimal 3)Exit. */ public static void main(String ar[]) { int a, b; String s; System.out.println("Please …

Member Avatar for bguild
0
219
Member Avatar for alice.cooper.18659

I am trying to make a histogram that represent the number of letter grades that are calculated. So the program reads in a csv file, pulls out the name, average grade and letter grade. From there it creates a histogram based on the letter Grades. Input: Alicia Marks,89,90,100,95,75,85,94,100,90,92 Bobby Ricks,98,79,87,79,9,98,7,19,98,78 …

0
97
Member Avatar for the_ yuo

if input is 0 150 17 the last number is 17 i need program that find how many 17 in 0 to 150? output should be 2 NOTE the program should run for any 3 input number

Member Avatar for chetas
0
302
Member Avatar for fffttt

How to set that one panel contains three panels and each panels has buttons and textfield

Member Avatar for JamesCherrill
0
78
Member Avatar for Violet_82

Hi all, I have just finished with my tict-tac-toe program, and I thought I'd post it here if anybody fancy giving me any feedback. Also, I have a problem with printing the board, probably due to my lack of knowledge in using `printf` as opposed to `println`. Anyway this is …

Member Avatar for Violet_82
0
235
Member Avatar for mike.woeber.5

I would like to know how to design a program(a) to run outside another program(b), that will click a button that comes up while using the program(b). Reason being, is the program that I am using constantly asks me to hit next after scanning a product, so I want to …

Member Avatar for mike.woeber.5
0
148
Member Avatar for somjit{}

this is the problem code : import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.io.IOException; public class Prepared { public static void main(String[] args) { try { readerHelper r = readerHelper.GET_INSTANCE; System.out.print("enter username: "); String user = r.is().readLine(); System.out.print("enter password: "); String pass = r.is().readLine(); Connection con …

Member Avatar for somjit{}
0
223
Member Avatar for somjit{}

the following is taken from joshua bloch's effective java. pg 82: public class InstrumentedHashSet<E> extends HashSet<E> { // The number of attempted element insertions private int addCount = 0; public InstrumentedHashSet() { } public InstrumentedHashSet(int initCap, float loadFactor) { super(initCap, loadFactor); } @Override public boolean add(E e) { addCount++; return …

Member Avatar for somjit{}
0
173
Member Avatar for vivanie

How to coding this? "fill the variabel with bufferedReader and for and will be stop if the variabel=="ZZ""

Member Avatar for stultuske
-1
136
Member Avatar for leah.s.h

You will need to check that the four parameters entered by the user are blank, so you will do the same as you did before but four times. To Identify if the User Presses <enter> You have written a JAVA program that creates a CD object with four instance variables, …

Member Avatar for stultuske
0
304
Member Avatar for ankit.pandey3

Hi friends, Can any one tell me the java program that how to convert Octa Decimal to HexaDecimal without using inbuild functions. I tried a lot but not successful. Please Please Please post the program... Thanks in advance..

Member Avatar for bguild
0
289
Member Avatar for riahc3

Hello Im using the FileUtils.copyDirectory method but it gives me the error of "Failed to list contents of foldername". I know the folder exists and I can write there because creating a file works. What could be wrong?

Member Avatar for riahc3
0
559
Member Avatar for game06

i am using xammp database. and i want to get last ID from my database so that i can insert new stuff in it. the code below doesnt get me the last it. its prints it is adding one next to last it. ex 7, 71, 711, 7111, 71111, but …

Member Avatar for JamesCherrill
0
161
Member Avatar for wolwayne

I am making an examination system desktop application in Java Swing. I have a frame named 'show_class_question' frame. This frame is used to display questions and four options from database. Whenever user clicks 'Next' button I am calling this same frame (show_class_question) again and agian from itself (self - refrencing) …

Member Avatar for stultuske
0
406
Member Avatar for vamshi381

i have text field when i enter a value in it i want to retrive the values matching to the entred word from database and display those values in a pop up window am using jsp and struts oracle 10g database

Member Avatar for stultuske
0
119
Member Avatar for sushants
Member Avatar for stultuske
0
138

The End.