32,204 Topics

Member Avatar for
Member Avatar for Lostin

Hey, I am making a card game of Higher or Lower. Currently an image of one card pops up and you have to guess if the next card is a higher or lower value than the one you can see. My question is, using BlueJ, how do I display two …

Member Avatar for masijade
0
93
Member Avatar for atinus cool

hi,all in this basic java prog.I want to input all the elements of matrix one and two with commandline argument.please help. Thanks for read this...

Member Avatar for masijade
0
38
Member Avatar for zetologos

What is the difference between makin an ArrayList these two difference ways? i know the method will be the same and both will essentially do the same thing. but why two ways to initializing arraylist? [CODE] ArrayList<String> list = new ArrayList<String>(); List<String> myList = new ArrayList<String>(); [/CODE]

Member Avatar for masijade
0
102
Member Avatar for Katana24

Hello - quick question, I have created a method which prints a chosen symbol multiple times: - User enters 5 - Print this: ***** **** *** ** * I'm aware of recursion and know how to use it, my method uses it to do the above but I also use …

Member Avatar for masijade
0
164
Member Avatar for Geowil

Here is my code at the moment: [code] import java.util.Scanner; class menuOperations { String[] fNames = new String[50]; String[] lNames = new String[50]; String fName = " "; String lName = " "; String sFName = " "; String sLName = " "; int dAmount,dTimes,i; Scanner in = new Scanner(System.in); …

Member Avatar for Geowil
0
99
Member Avatar for LianaN

Hi! I'm trying to zoom in/out ImageIcon in JLabel. The problem is that after 2-3 zooming actions, the image quality becomes horrible. How could I solve this problem? Thanks! [CODE] private void doZoom(int scaleFactor) { Component[] c = SelectablePanel.getMainPanel().getComponents(); for(int i = 0; i < c.length; i++) { if(c[i] instanceof …

Member Avatar for LianaN
0
188
Member Avatar for neutralfox

Hello friends, You have been of great help to me till now. I got a new problem , I am unable to run the JAR file. When i click on the Jar file, I got the following error : "Could not find the main class: socketprog.Main. Program will exit." Thanks …

Member Avatar for Marin88
0
2K
Member Avatar for Coyboss

Hi there everyone, I need some help getting started creating a Java program for a class I am taking. Here is what I need to do: Create A program written in Java (without a graphical user interface) that will calculate and display the monthly payment amount to fully amortize a …

Member Avatar for Coyboss
0
228
Member Avatar for davetheant

Hello everyone. I am getting a [CODE]java.lang.NoClassDefFoundError: gnu/regexp/REException'[/CODE] when I run my code. Is there any way around this? I understand it has something to do with a class not being in the write path. I'm using BlueJ as my IDE and I'm trying to use the methods in someone's …

Member Avatar for ~s.o.s~
0
405
Member Avatar for inilahs

Hello everybody .. This is the first time i post on to daniweb for a favour. Am just proceeding with a math contest. in general say n , need the catalan series with formula 2n!/(n!*(n+1)!) . i am in need of the answer for n=1000. I thought cud try this …

Member Avatar for JamesCherrill
0
114
Member Avatar for shack99

Hi all, I'm having a bit of a problem with my code. I've created an arraylist method and when values are inputted it prints them one by one. [CODE] import java.util.*; public class ArrayListDemo{ public static void test(int i){ List arrlist = new ArrayList(); arrlist.add(i); System.out.print(arrlist); } public static void …

Member Avatar for shack99
0
178
Member Avatar for blueman:-0

I have form and that have a label I would when I run the program my counter count in label but when i run that's nothing open the form and nothing and that's my cod where error [CODE] private static int totalNum = 0; private void formWindowActivated(java.awt.event.WindowEvent evt) { class …

Member Avatar for JamesCherrill
0
88
Member Avatar for lse123
0
60
Member Avatar for rohit2

I am new to swing. Now I am developing a frame with multiple tabs. For this I used jTabbedpane. Now the problem is that I am not able to save contents of seleted jTextPane of jTabbedPane. While saving, I am only able to save contents finally wriiten on jTextPane. So …

0
68
Member Avatar for ajijacobm

hi guys, Im doing a project that executes a java file through another java file.. I need to use Runtime.exec() funtion for the purpose. But, there is trouble in passing the input to the java file. Please help me solve the situation. my main funtion is shown below... [CODE] import …

Member Avatar for ~s.o.s~
0
165
Member Avatar for pady pramod
Member Avatar for fairy1992224

I need to complete this project by next Monday. How do I do a menu selection EXAMPLE: Press 1 to enter the model number. Press 2 to delete a record. Press 3 to exit the program. I'm doing this project on NetBean using Java. Can someone please teach me? Thanks!!!!

Member Avatar for peter_budo
-1
102
Member Avatar for andyhunter

Stuck on trying to limit a persons name to say 20 characters in a string or a phone number to 6 characters in a string, i cant get the {} inside or after regex to work with either a minimium or maximium number so that in my loop if a …

Member Avatar for aspire1
0
90
Member Avatar for ubi_ct83

hi guys, thanks for viewing my thread. i have a program in java application and i want to connect to mysql database because i need to use database for a few parameter.the result will b showed in web-page using php. my question is how can i connect my program to …

Member Avatar for smantscheff
0
164
Member Avatar for methmignonne

hi, i want to convert a color image into a greyscale image. after loading the color image, i have to count pixel by pixel to get the frequency of the color (0-255) to be placed in an array. can anyone help me how to count the frequency? thx in advance.

Member Avatar for methmignonne
0
1K
Member Avatar for Dorson8009

Hello, this is a newbie question, sorry for that, I am trying to port some Java code to C++. In this code I have a hashmap connecting string values to float arrays of varying sizes. They are specified like this: [CODE=Java] HashMap <String, float[]> hm = new HashMap <String, float[]> …

Member Avatar for Dorson8009
0
166
Member Avatar for hitomi_inukai

Hi. I'm developing a software for my degree project. I have some problems in sorting the probability item from linkedList object. Here are the snippets of my code (I have almost 400 lines, so if the below is not enough, please let me know) CLASS LINKEDLIST [CODE] class LinkedList implements …

Member Avatar for hitomi_inukai
0
108
Member Avatar for 54uydf

I can't figure out what am I doing wrong!! please help me before I lose it! I'm trying to send 2 different strings to a function that will put each word in the string into a MAP. string 1:[B] "I CAR Collision Repair Training"[/B] string 2: [B]"Autocar India"[/B] my map …

Member Avatar for 54uydf
0
153
Member Avatar for kvkc

Hi can somebody help at the earliest . My requirement is to download a file from the remote server and read it in order to insert into db. So, i have written a shell script that downloads the file. This has to be invoked by a java program, after downloading …

Member Avatar for masijade
0
1K
Member Avatar for Maria5683

How do you write the code using Scanner class to set up a menu (i.e 1 for something, 2 for something, and so on.) Then have the user to choose. Thanks

Member Avatar for fairy1992224
-2
46K
Member Avatar for ZEZO2010

HEllO EVERY ONE I need you help in my java code that I built on netbeans First I will example the idea of the programm GUI are containing two textfeild The first textfeild the user have to enter price The second textfeild the user have to enter weight then when …

Member Avatar for Democles
0
182
Member Avatar for blueman:-0

I have device and have the driver of it ,the device send data to me by serial port how i can receive that data in java .

Member Avatar for blueman:-0
0
84
Member Avatar for blueman:-0
Member Avatar for bibiki

hey there, I have the following code: [CODE] import java.io.*; public class Karakters{ public static void main(String[] args) throws IOException{ FileWriter in = new FileWriter("karakters.txt"); PrintWriter outfile = new PrintWriter(in); char x = 'A'; for(int i = 0; i < 300; i++){ System.out.println((i + 1) + " " + (char)(x …

Member Avatar for bibiki
0
4K
Member Avatar for nellyra

Hi, I have setup a syslog server that collects logs from various network devices. Is it possible to develop a system that can retrieve the logs in the syslog server into the system using Java?? I desperately need help here. Does anyone know how to code this or any suggestion …

0
105

The End.