32,199 Topics

Member Avatar for
Member Avatar for Hollyin

**I have a half complete coding which basically comes down to a gui interface. The problem is that I don't know how to get it working as ticket vending machine with fixed rates and fixed amount of cash being able to put in. So, far, I've done up to calculating …

Member Avatar for JamesCherrill
0
264
Member Avatar for tricket_7

I am working on this editDistance program in Java, but I cant figure out how to return the new strings..... The program is returning the editDistance, but everytime a char doesnt match I want to delete it out of the string, in the end when I call printDistance(), I want …

Member Avatar for JamesCherrill
0
395
Member Avatar for aslam.junaid786

In this main class I used a **ListIterator** variable, **hasnext()** and **next()** method to print LIST memebers. I created litr variable of ListIterator, I performed some functions on the list i.e, sorting(ascending and descending) etc. I used the same litr variable and a while loop for outputing the list again …

Member Avatar for JamesCherrill
0
337
Member Avatar for loveparadise

`Inline Code Example Here` import java.io.*; import java.util.regex.*; String []str = {"123","0959","75443","19908","1","11879","1119","276","566777","7","675","4435","54","6588","99","124","78"}; String filename = "temp.text"; try{ File file = new File(filename); FileWriter fw = new FileWriter(file); for(int i=1;i<=str.lenght;i++){ // Start for BufferedWriter bw = new BufferedWriter(fw); bw.write(str); bw.newLine(); } // End for bw.close(); }catch(IOException ex){ System.out.println("Error.."+filename+" "); } public …

Member Avatar for loveparadise
0
367
Member Avatar for Mr.M

Hi Dw I've been so interested in to java because so far it makes almost my dreams come true with it flexibility of fitting almost every where or anywhere, so I'm having a thought here for mobile phones, I want to create a certain program or my sim card I …

0
103
Member Avatar for Gebrish

Here is sample Requirement! I need Java Web Services Sample Project implemented in both RPC & RMI. Functional Requirements: Login Add Student Update Student Search Student Delete Student Database: MySQL Can I get it now???? Thanks for your time and consideration!

Member Avatar for JamesCherrill
0
40
Member Avatar for SummerSunshine

hi all ! does anyone know how to open up the window of a normal program from a graphics window in Blue J

Member Avatar for JamesCherrill
0
149
Member Avatar for Student22

Write a new method named count(E o) that returns the number of elements in the list that are equivalent to the specified object. Write a new method named reverse() that reverses the order of the nodes in the list. Can you figure out a way of doing this non-recursively in …

Member Avatar for JamesCherrill
0
281
Member Avatar for mk12345
Member Avatar for sk8ergirl

I have this method I'm trying to the return is the student that will be removed and then remove student at pos I tried almost everything I put the return outside the if statment , but I still get error I also tried to substract 1 from the size but …

Member Avatar for sk8ergirl
0
332
Member Avatar for SHARATH_1

I am trying to add actions and paint on the image in JPanel. Till now I could only succeed to add image into the JPanel. But I could not add mouse actions on the image and paint it. Can anyone please go through my code and give suggestions!! public class …

Member Avatar for mKorbel
0
221
Member Avatar for Biff2013

You will use the P10Class here: public class P10Class public class P10Class { public static int SEQ_NUM; public static int BIN_NUM; public static int seq_search(int[] data, int key) { boolean found = false; int i = 0; SEQ_NUM = 0; while ( !found && (i < data.length) ) { if …

Member Avatar for Biff2013
0
272
Member Avatar for Benjamin_4

Honestly am writing an application and am stuck at this point. problem is am writing an asset derpreciation application and i am calculating for Monthly Depreciation,End-of-year value ,Accumulated depreciatio.I want get the results of the values in this form in my jTable when the calculation is done. for example when …

Member Avatar for mKorbel
0
205
Member Avatar for JohnOSull4021

Hey guys trying to make this OO but no luck..can anyone help? import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; public class Main implements ActionListener { public static void main(String[] args) { new Main();// Calling the class construtor. }//end main //Setting up ALL the variables JFrame window = …

Member Avatar for JamesCherrill
0
158
Member Avatar for JohnOSull4021

Hey guys, so I'm making a board game in java similar to X's and O's on a 4x4 grid but there's different types of pieces etc., but what must be done is you must pick a piece to give to your opponant for them to place on the board and …

Member Avatar for JohnOSull4021
0
140
Member Avatar for techyworld

hello everyone, am here to solve a problem and i need advice from u ppl. i have my database consist of 7 tables which generates a java web application. (Spring,Jsf,primefaces,java) when the user login, only the data for that particular user from the tables should be displayed. I was thinking …

0
88
Member Avatar for ysaburou

Good morning! I have these VideoChatRTP class I got [here](Good morning! I have these VideoChatRTP class I got here (I just added the main) and an EncodingUtilClass class from here.) (I just added the main) and an EncodingUtilClass class from [here](http://www.java2s.com/Open-Source/Java/6.0-JDK-Modules/java-3d/com/db/media/rtp/EncodingUtil.java.htm). VideoChatRTP.java import javax.media.rtp.*; import javax.media.*; import javax.media.protocol.*; import java.awt.Image; …

0
201
Member Avatar for ysaburou

Good morning! I have these VideoChatRTP class I got [here](http://www.java2s.com/Open-Source/Java/6.0-JDK-Modules/java-3d/com/db/media/rtp/VideoChatRTP.java.htm) (I just added the main and made player static) and an EncodingUtilClass class from [here](http://www.java2s.com/Open-Source/Java/6.0-JDK-Modules/java-3d/com/db/media/rtp/EncodingUtil.java.htm). VideoChatRTP.java import javax.media.rtp.*; import javax.media.*; import javax.media.protocol.*; import java.awt.Image; import java.io.*; import java.net.*; import com.sun.media.ui.*; /** * A RTP over UDP player which will receive …

0
146
Member Avatar for ddnpresident

import java.util.Scanner; import java.util.Arrays; public class project { private static Scanner keyboard = new Scanner(System.in); public static void main() { double row [][]; int positionInRow, numberInRow, rowSize, index, numberOfRows,weight; int maxWeight = 100; System.out.println("Welcome to the Band of the Hour"); System.out.println("-------------------------------"); System.out.print("Please enter number of rows : "); numberOfRows = …

Member Avatar for kal_crazy
0
324
Member Avatar for SCass2010

Hi all, Wondering if anyone could help - I have a project I'm working on - part of it involves loading a list of resource files at runtime. I can hardcode each file and use the ClassLoader.getResource("....") to get each file, but I was wondering is there a way to …

Member Avatar for JamesCherrill
0
202
Member Avatar for garysmyth

I try read values from CSV file using commonCSV parser. The file has values like this. Name,Phone,Country,languageknown gary,423432,USA,[English,spanish,German] After parsing I iterate, I get value like this, gary 423432 USA [English spanish German]. But i want like this, gary 423432 USA [English,spanish,German] the braces contain one full string but it …

0
57
Member Avatar for eldiablo1121

Hello, I'm trying to write a program that takes an input file name and lists the folders in a heirarchy ex.Folder subfolder etc I have most of my code, but I'm getting 2 errors that are connected and I have no idea how to fix it. Here is my code: …

Member Avatar for eldiablo1121
0
267
Member Avatar for sk8ergirl

I'm practcing for my test and I couldn't solve these questions I spent hours trying to solve it but every time I get error ArrayList<objClass> li = new ArrayList<>(); public objClass RemoveAtPos(int pos){ // I'm trying to remove the object at the given pos , but first I want to …

Member Avatar for Seldar
0
148
Member Avatar for JohnOSull4021

Hey guys, I have a program similar to X's and O's. But I need to put the "CheckWin" method in another class and call it from there. Im having no luck, can anyone help? (CHECKWIN PART AT VERY BOTTOM) import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.*; public …

Member Avatar for stultuske
0
187
Member Avatar for theashman88

I'm taking a database class, to be more specific MySQL. I want to know if I will use this if I enter the programing field as a C#, C++, or Java programmer. If so what will I need to know

Member Avatar for RomelynCastillo
0
331
Member Avatar for nirmeen.asad
Member Avatar for nirmeen.asad
0
1K
Member Avatar for lobnaallam

****Hi everyone! I have to make a pig latin translator for cs hwk. I've made my code and everything works up until i put it together. I need to debug it, but can't figure out the if statement in the main. The assignment is "Here's how to translate the English …

Member Avatar for lobnaallam
0
1K
Member Avatar for sankubha

I am doing one java application.... i want to create uninstall program for that application... thanks ...

Member Avatar for stultuske
0
72
Member Avatar for nikolaos

ProducerConsumer_Using_ExecutorService class in a for loop initiate producer consumer threads using worker threads from ExecutorServiceThreadPool class. consumer thread takes an element from queue adding it to ArrayList consumerdata. Seems that consumerdata has no elements. why is that; Both producer - consumer threads seem to work. import java.util.ArrayList; import java.util.Iterator; public …

Member Avatar for nikolaos
0
4K
Member Avatar for nirmeen.asad

Hi (Salm).. In my java code i have to insert a table into a text area, by choosing "insert table" from the menue "Insert" so then the program will ask me to enter the number of rows & cols to create the table with the numbers i've entered.. the image …

Member Avatar for nirmeen.asad
0
294

The End.