32,199 Topics
| |
i have written following code so far. But now i am stuck with one porblem. I have made a loop that exactly modify Numeric Quasi identifier by one by one. Now problem is: I hv made loop that modifies exactly once,twice and all four Q.I.(Quasi IDentifier) How can i make … | |
Hi, i have two buttons: Add button and Clear button one Jlist 1- when i click on Add button, it will add some data in the jlist. 2- when i click on Clear Button, it will clear perfectly the jlist. but when i re-click on Add button, here it add … | |
Can anyone please tell me how to run the genetic programing examples given in the **Watchmaker Framework library using Net Beans**? I have added all the jar files in a library and added this library to my project.But still I am unable to run the examples. Thankyou ! | |
In this code, I am prompting the user to pick a number from 1-1000 and having the user keep it in his/her head. Then, in 10 tries or less I am trying to have the computer guess the user's number. This is what I have so far... import java.util.*; public … | |
Hi guys, I got a problem with my Programm after adding a new Class in my Tic_Tac_Toe version...I tryed to use a method of the clas KI_Test1 ( which is a very simple "AI"). The class before without static works. After changing everythin in static, because my main method is … | |
Hello guys! I need some help... I'm new in Java programming and I'm dealing with in issue. I'm at a step of my project that keeps stoping me from going further. I have some xml files that contains diacritics and I need to read them and extract the tag's that … | |
Hi everybody. Sorry for the newbie post. I have an assignment I was just looking for some help with. I need to create a dice game that generates a random two dice throw and then gives you three tries to guess the number. I seem to be a bit stuck. … | |
Could someone help java code to read number of lines, words and characrters in paragragh . | |
Hi, I'am creating a single JFrame UI, that uses multiple JPanels (implemented through JTabbedPane). The problem I'am having is aligning the objects within each JPanel. In the first JPanel all of the objects are centrally aligned. I'am unsure of what to do to solve the problem. I have read the … | |
HI I was wondering if you can help me with this random number program. import static java.lang.System.out; import java.util.Scanner; import java.util.Random; class GuessAgain { public static void main(String args[]) { Scanner myScanner = new Scanner(System.in); int numGuesses = 0; int randomNumber = new Random().nextInt(10) + 1; out.println(" ************ "); out.println("Welcome … | |
["Objects that are instances of an inner class exist within an instance of the outer class"](http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html) Even though I attempt to create an independent instantiation of the inner class, the outer class is always there because of the statement above. ##Is that ture? If true, then that would also mean … | |
Hi can you help me please how can i change the color of progressbar or just look like in windows xp progress bar...please help me...thank you in advance hoping for your positive responds... | |
I am trying to get the ItemListener to work on this program. I keep getting an error that says the method getSelectedItem cannont be found and cannot figure out how to fix it. import java.awt.*; import java.awt.event.*; public class Buttons extends Frame implements ActionListener, ItemListener { public Buttons() { //set … | |
How to add css to all jsps in java web project. Is it possible using web.xml ? | |
Hi All I am new to java. I am facing a problem I want to compare a string to a set of strings, For example there is variable string x, If the value String X matches to String A , String B, String C then run the particular code otherwise … | |
Hi I am currently working on a project where I have to find the most frequently occurring word in an imported file. I have imported the file and can display what it says, but Im having trouble with this part: [COLOR="Green"]"Create a Word class that has a string and a … | |
this program is 2 classes and it has 2 JLabels, 2 JTextFileds, and 2 JButtons... it convert temperatures from Fahrenheit to Celsius and from Celsius to Fahrenheit.. Class 1: [code] // Author: Helen Toma import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.JTextField; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; … | |
Hi folks.. I had a problem and looking for the answer..The exact question of mine is [this](http://webapps.stackexchange.com/questions/18959/can-i-form-a-direct-url-to-a-particular-gmail-account) Sorry that i dint typed the entire question here but i'm afraid that i may not able to explain well if I type that entire thing. But that was my exact question which … | |
i'm trying to modify a java code. I have a jSpinner where the user have to choose a number like minimum 0 and after this step the user can continue by clicking the OK button and continue his steps... So here what i want is when the user didn't enter … | |
Hi, i try to handle a Neagtive number exception in my code. i tried this but it shows "illegal start of type" why please? Here is my code: public class JPanelTemporal extends javax.swing.JPanel { public JPanelTemporal() { initComponents(); } public void setDuration(int duration){ this.jSpinnerDuration.setValue(duration); } public Time getTime(){ Time time … | |
Hi, I've been given an assignment to write a java program that determines if a random given number is Prime OR not. But we also have to make comments in each lines, explaining the function/purpose of each lines to this java coding. So far, I've gotten the program corrected! All … | |
hi folks,basically i am facing a problem importing a package, dir structure is like src |---com |---example |---model |---BeerExpert.java package com.example.model; import java.util.*; public class BeerExpert { public List getBrands(String color) { //code goes here } } src |---com |---example |---web |---BeerSelect.java now in BeerSelect.java i am importing the BeerSelect … | |
Can anyone help me in my Java assignment ? Due date on 28/11/2012 | |
Hi, I am currently making an assigment for JAVA but I am stuck. I have to make a birthdate from the three parameters: day, month and year, which are numbers = int. With this I have to put in some checks for valid dates. That part I think is done, … | |
Hi there I am reading some java tutorial and a have a question about these 2 classes java.util.Scanner; javax.swing.JOptionPane; In the tutorial I am looking at the 2 classes are used in separate programs to get the input from a user With the first class http://www.homeandlearn.co.uk/java/user_input.html after importing the class … | |
I am having some trouble with a gcd program that I have created. My problem is that my output is not formatted correctly, and I believe that I need to use arrays to print it out correctly. THe format for the output is: Num1 Num2 GCD Num1 Num2 GCD for … | |
I am trying to understand how packages work. I think I have finished steps 1-7 but I am not sure. Now I am trying to start step 8 however I am confused as to how I can get the Test class to use the squar and cube classes. How does … | |
I need help doing this assignment. Here are the instructions: **5.06 Assignment Instructions – Bottle Cap Prize** **Instructions:** Write a program that uses the Monte Carlo sampling method to estimate the average number of bottles of e-Boost someone would have to drink to win a prize. There is a 1 … | |
I created a JTree from an XML file like this: //Load Tree from XML file File stocks = new File("//Users/scott/Desktop/saSample.xml"); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); doc = dBuilder.parse(stocks); doc.getDocumentElement().normalize(); // Set root folder DefaultMutableTreeNode rootnode = new DefaultMutableTreeNode(doc.getDocumentElement().getAttribute("saName")); DefaultTreeModel treeModel = new DefaultTreeModel(rootnode); objMgrTree.setModel(treeModel); // Set Pages … | |
Hey quick question..I have a file..have decoded it..but in order to work out the file contains..I was asked to use brute force..I have entered all the keys (0-255) but not one of them give me a decent outcome..I hope this makes sense..this was done in java..(its for a coursework) I … |
The End.