32,204 Topics
| |
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 … | |
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 … | |
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 … | |
Hi, I m trying to write code to merge two csv files. could any one help me out to get the hints to start? | |
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? … | |
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, … | |
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 … | |
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 … | |
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, … | |
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 … | |
[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 … | |
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 … | |
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 | |
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? | |
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 … | |
[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 … | |
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 … | |
[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 … | |
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) … | |
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 … | |
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 … | |
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 … | |
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 … | |
Hi, I'm writing Java program to map two files.How can string input be given in Java? Thanks in advance. | |
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] | |
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 … | |
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 … | |
hello all how to create image from a text file (only from two or three sentences) thank you denny | |
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 … | |
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); … |
The End.