32,204 Topics

Member Avatar for
Member Avatar for ynwa

Hi all, I am using a SWT combo box in java. The functionality is like whenever a user enter string in the combos text field, based on that string i am filtering the combos list values and displaying the list using combo.setListVisible(true). Now, after typing the first letter the list …

Member Avatar for Aviras
0
420
Member Avatar for mcspud

Hi i need help with a asighnment, i am supposed to take an existing pig latin transualater and modify it to deal correctly with capitals and punctuation, i am currently at a loss at what to do. here is the class file: [CODE]import java.util.Scanner; public class PigLatinTranslator { public static …

Member Avatar for mcspud
0
136
Member Avatar for BIG J

Hi, I am doing some blueJ work but am not the best at it. I have to create a basic library system, this is made up of three classes. Book, Member and Library. These are the following requirements for my library class: 1.It has two fields of ArrayList: one is …

Member Avatar for BIG J
0
198
Member Avatar for javausers

Hi, I m trying to write code to merge two csv files. could any one help me out to get the hints to start?

Member Avatar for javausers
0
666
Member Avatar for tania123123123

my task is Design and implement an abstract base class ArithmeticExpression that represent any binary (having two arguments) arithmetic expression. The abstract class should include at least two methods called evaluate and display.... i have done the code but it doesnt output anything.. im really stuck.. does anyone know why? …

Member Avatar for JamesCherrill
0
184
Member Avatar for innspiron

Hello, can anyone suggest me how to convert string to xml object in java? I have a string (Data) ant now I have to pass it as parameter as xml object, which structure should be: <MGWData>Data</MGWData> Where I surf I always see only solutions for converting string to xml document, …

Member Avatar for Aviras
0
737
Member Avatar for kumaresen

i am having prob in looping this java program...the 1st section is to choose the cloth material...then the length of material needed n lastly calculate the price of the needed length after discount...have done all of them...but having a prob were should i insert the loop to make the program …

Member Avatar for Aviras
0
139
Member Avatar for th3b3n

Hi every one, new poster here and new to Java as well. I'm working on a java program that will reads an excel file extracts the data and prints it to console. I've gotten that part to work in the below code, however I'm starting the next phase of the …

Member Avatar for th3b3n
0
179
Member Avatar for anand01

Hi all when i run the following code [CODE]TreeSet<Integer> s = new TreeSet<Integer>(); TreeSet<Integer> subs = new TreeSet<Integer>(); for(int i = 606; i < 613; i++) if(i%2 == 0) s.add(i); subs = (TreeSet)s.subSet(606,true, 630,true); s.add(629); s.add(630); System.out.println(s + " " + subs); [/CODE] the O/P is [606, 608, 610, 612, …

Member Avatar for anand01
0
127
Member Avatar for pxndx

Hey guys, Well I had a few questions, so I have an employee Database with id,fname,lname,dep and I wasn't sure if I should do and Employee class whit constructor and what not, and make the class read the information form the Database and then create and ArrayList<employee> and fill it …

Member Avatar for Paul Norris
0
179
Member Avatar for jasperking88

[ICODE][/ICODE]Here is the Question Declare an array of size 5 Input 5 values from the user Output those 5 values back. Output looks like following: Enter a value: 2 Enter a value: 4 Enter a value: 6 Enter a value: 7 Enter a value: 9 You have entered: 2 4 …

Member Avatar for jasperking88
0
2K
Member Avatar for 9662964

I do not want to accept same letter to guess and if does , want to show caution and force to type another try... and If user got correct letter than I do want to show the letter instead of "_" _ _ _ _ _ (Example, word is school …

Member Avatar for ASDFSGHKL
0
288
Member Avatar for anand01

Hi all , I plan to do java certification which version should i do , please suggest me and I am beginner 1Z0-853 (OR) OCPJP 6 --1Z0-851 (OR) OCPJP 7 --1Z0-804

Member Avatar for anand01
0
90
Member Avatar for jackmaverick1

I need to take the end off of a file. What I mean is that I have a file, and it has an end marker, but I can't write past the end marker. Is there a way to do this?

Member Avatar for jackmaverick1
0
113
Member Avatar for DaniwebOS

So my goal is to use inheritance and as you can see I inherited Point Example which has x, y as variables. Well for some odd reason my Length seems to be in correct and I'm not sure where I went wrong. Any guidance will be very much appreciated. Just …

Member Avatar for Paul Norris
0
156
Member Avatar for Daigan

[CODE]public void mainmenu () { title (); System.out.println ("If you wish to exit press 5, if you want to go the intro press 2, and if you want to continue 3:"); do { try { procstr = c.readLine (); proc = Integer.parseInt (procstr); if (proc == 3) askData (); if …

Member Avatar for Paul Norris
0
131
Member Avatar for pote86

The following is my code for login function. I save the password as MD5 but inside the url after logged in it shows the full word instead of showing MD5. I'm still very new to Java EE and any help I can get will be very much appreciated. [CODE]<%@ page …

Member Avatar for pote86
0
2K
Member Avatar for FALL3N

[CODE]public class Example { private static void createAndShowGUI() { JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame("Window"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel emptyLabel = new JLabel(""); emptyLabel.setPreferredSize(new Dimension(175, 100)); frame.getContentPane().add(emptyLabel, BorderLayout.CENTER); frame.pack(); frame.setVisible(true); } public static void main(String[] args) { javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { createAndShowGUI(); } }); } }[/CODE] In The above …

Member Avatar for FALL3N
0
199
Member Avatar for Daigan

Hi, so my problem is that I need a method that does the calculation for my program and return it. Here's what I have so far. It keeps saying that the method needs to return a double value. Can someone help me? Thanks in advance. [CODE]private double spoonConvert (double answer) …

Member Avatar for Daigan
0
67
Member Avatar for nick6987

i am having trouble with lets say i do not have any test scores and enter -1 there is an error of dividing by zero. [CODE]import java.util.Scanner; public class myarray { public static void main(String args[ ]) { Scanner kbd = new Scanner(System.in); //total number of quiz scores possible in …

Member Avatar for nick6987
0
2K
Member Avatar for sirlink99

I have an error when I shorten 3 lines of code to one. How come this code works [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.Vector; public class Draw extends JPanel implements KeyListener, Runnable, ActionListener{ Vector<Wall> walls = new Vector<Wall>(); Vector<Enemy> enemy = new Vector<Enemy>(); Player p = new …

Member Avatar for sirlink99
0
216
Member Avatar for Dersev

Hello I have a small problem with Drag and Drop images. Class GridImage creates small thumbnails of images to 100 x 100px Image drag and drop is defined by mouseListener and mousePressed event. I know that actually I am copying component JLabel to class DrawImage with these settings. What should …

Member Avatar for NormR1
0
218
Member Avatar for applejax77

I am working on the payroll calculation program below and would like some help with the JTextField area. I would like the program to respond with a GUI window letting the user know that the JTextField is blank and must enter First name, last name, and so on. Any help …

Member Avatar for applejax77
0
1K
Member Avatar for swetha.y

Hi, I'm writing Java program to map two files.How can string input be given in Java? Thanks in advance.

Member Avatar for swetha.y
0
125
Member Avatar for sidra 100

i m making a BMI calculator GUI which calcuates weight in corresponding to height shown on slider but there is some error in program. problem lies in following line [CODE] int value = slider.getValue(); int weight=0; if (if buttonGroup.getSelected()=="Male") { weight=value/28; } else if (buttonGroup.getSelected()==Female) { weight=value/30; } System.out.println("weight");[/CODE]

Member Avatar for javaNooblet
0
94
Member Avatar for powerdink

Hello all, I'm trying to inherit a "CarPanel" I created using arrays to draw various shapes in order to make a car. Now I am trying to essentially create a subclass that inherits that class, but add a Timer Action to move the car across the screen. I got it …

Member Avatar for JamesCherrill
0
505
Member Avatar for erogol

I am currently developing a search engine and I have some implemented algorithms that are written in Java but also I need to get some Database communication which is easy thing in Ruby an Rails. Thus, Is there any way to use both language in the web application development Regards …

Member Avatar for SoldierCoder
0
146
Member Avatar for dennysimon

hello all how to create image from a text file (only from two or three sentences) thank you denny

Member Avatar for JamesCherrill
0
52
Member Avatar for shihmeng91

This fe. My system able to run, but at seat number for the ferry is not changing. i am not sure what happening, but i guess it related to the for loop. It you start the system. Press P -> Press B-> Name -> Select ferry -> Then it print …

0
104
Member Avatar for low1988

I'm working on a portion of the codes to encrypt the ATM card of the user. [CODE] Public class AtmCardAuth{ public static byte[] computeCheckBytes(int acctNum, int pin)throws Exception { // byte[] ret = new byte[32]; // for(int i=0; i<ret.length; ++i) ret[i] = (byte)i; // return ret; String password = Integer.toString(pin); …

Member Avatar for jwenting
0
190

The End.