32,199 Topics
| |
My custom button thing isn't clickable. I don't know why! (obviously :P) I DO have an action listener This make a button that looks like a cross. The input is: [code] "name", g, 0, 0, 100, 100 [/code] It looks like this: [url]http://mitch9654.zymichost.com/Java/index.html[/url] [code]package Buttons; import java.awt.*; /** * * … | |
Hello friends i have spend a week to make a notepad.But i have one error in it i dont know where i am wrong . i am not able to add JFileChooser in my notepad i have JFileChooser in my code but its not working properly that's why i have … | |
pleas help [CODE]public double getInvoiceAmuont(int q,double pric){ System.out.println("ente the quantity and the peice" ); q=in.nextInt(); pric=in.nextDouble(); if (q<0) return 0; if (pric<0) return 0; return q*pric; }[/CODE] is this answer correct for this question : {{ -Provide a method named getInvoiceAmuont that calculates the invoice amount (i.e., multiplies the quantity … | |
I have written two different classes that are in two different files one is LoadData.java and the other is csvReader.java both are in the same folder. In the class LoadData I try to use a public function in csvReader by calling csvReader.getData(), when I compile LoadData, which is after I … | |
Sorry if this has been asked before. I have a jframe with a textcomponent in it and a menu with an exit option. When you select the exit option a funciton is called that checks whether a change has been made to the document and the user can select to … | |
Hey all, I need help with this. I have a .txt file, called "littlefile.txt", inside that .txt there is text of course and my java program is supposed to read that text (as a String), and find a word like ... "hello", ... that's ok, but the java program must … | |
Hello, a few months ago I started not being able to view javascript. Google ads, chats, javascript popups, chats ect. I use Mozilla firefox but I have the same prob on IE (Yes javascript is enabled on both). I use XP and run Nortions Internet Sec 2005 although I have … | |
Hi, I am working on assignments that deal with Generics in java. I have a class Movie that have a String name variable. However I have to add a few more properties to Movie objects like Release year and Director name. So I created an Inventory class that uses the … | |
Can I apply JSP and J2ee technology for Social Network developing I am novic in web programming and My thesis title is social networking ! Please reply and advice me how should I do? I have little experiences in J2EE and MySQl looking forward to your reply!! Opera, Mandalay Technological … | |
Anybody know of any good tutorials for customizing the appearance of Java GUI's and applets. Specifically, I'd like to design the layout of the GUI or applet in Photoshop. Thank you for your time and help. | |
Write a program that asks the user for the name of an input text file. The text file (which could be created with NotePad) will contain integers in character format, one per line, such as follows. 12 1023 -56 84781 0 -9371 The program also asks for the name of … | |
I'm trying to create a blackjack program for school. No matter what I've been doing, this keeps coming with errors. My teacher says theres some logic errors, and i don't understand it. [code] import java.util.Scanner; import java.util.Random; public class BlackJack { public static void YesNo(){ Scanner input = new Scanner(System.in); … | |
Estoy haciendo un programa en java donde el usuario puede jugar torres de hanoi o resolverlo solo, pero cuando hago q se resuelve solo me tira d una vz la solucion enontonces e intentado cn timers y sleeps para q pare redibuje y asi se mire paso a paso pero … | |
[CODE]import java.util.Scanner; public class THREE{ public static void main(String args []) { Scanner in = new Scanner( System.in); String symbol; double averagePrice; double stockPrice; int sum = 0; int count = 0; final int FLAG = -999; char options; do { System.out.println("Please chose from one of the following menu options: … | |
Python functions. 1. Given a list of words, return an array which indicates the frequency that each letter occurs. For example, in the list ["apple", "bob"], [ 'a' -> 1, 'b'->2, 'e'->1, 'l'->1, 'o'->, 'p'->2] . The order of the array does not matter and a Frequency class will be … | |
the program asks the user to input the number of users who wants to play. i couldn't get the result of players.length individually. each players result should be number of correct answers from the number of questions asked. please help!. [CODE]import java.text.DecimalFormat; import java.util.Random; import javax.swing.*; public class coll { … | |
G'day, I've got rather a simple problem to deal with though i'm personally having some trouble. I've recently fixed up some of my database queries so that i use a view to get the data that i need. My view gets the following info: [LIST] [*]Attraction Name [*]Package ID [*]Package … | |
code [code] import java.awt.*; import javax.swing.*; import java.awt.geom.*; public class QuestionA extends JApplet { public void init() { PanelLukis panel = new PanelLukis(this); getContentPane().add(panel); } } class PanelLukis extends JPanel { private int x_axis, y_axis; private int squareWidth, squareHeight; private int x, y, coordinateX, coordinateY, squareNo; JApplet app; public PanelLukis(JApplet … | |
I am being tasked to record TCP data and play them back with same speed. I am able to record tcp data but struglling to playback with same speed. If someone can help will be greatly appreciated. My codes below are reading TCP data and writing them in minute files … | |
Hello everyone, I am trying to build this simple chat program that consist of two classes. One is Server class and the other one is Clint class, but I have this problem with it. It does send and receive strings, but after the the second received string it does stop. … | |
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.io.*; import java.text.*; import java.util.regex.*; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; class Clustering1 { public static void main(String[] args) throws IOException, FileNotFoundException { int diff_matrix[][] = new int[500][500]; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the data file name\n"); String fname=br.readLine(); … | |
import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.io.*; import java.text.*; import java.util.regex.*; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; class Clustering1 { public static void main(String[] args) throws IOException, FileNotFoundException { int diff_matrix[][] = new int[500][500]; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the data file name\n"); String fname=br.readLine(); … | |
Dear friends i just need a web link or an ebook that contains all java built in functions and classes with it's return types and parameters. thanks in advance | |
Hi im trying to connect to my database but i dont know why i cant load my jdbc driver: -I've saved the jar file together with the other java files in the same folder called "a" -I used –classpath flag: Windows: "java -classpath .\mysql-connector-java-3.1.8-bin.jar;. LabDB4" but I dont know if … | |
I want to get the size of a folder and also the size of files in that folder but the output is zero even though I used the java **long method** for file size and a for loop to access the files in the folder.The programme only outputs the size … | |
Write a program that has only one button in the frame. Clicking on the button cycles through the colors: red --> green --> blue --> gray --> red --> and so on, one color change per click. In addition to the setBackground( Color.color ) method we have been using, you … | |
I'm running Eclipse for Java. I created a DOM version of an XML file. Now I want to change an attribute of an element in the file. I called a method that called a method in the class that controls the DOM, and I got a dialog box saying "JDI … | |
Ok, so I created a Desktop Application in Netbeans for my class's final project, the thing is I have to present it to my class at my school, but the computers there only have jcreator, how would I get it so that i can compile a netbeans desktop application project … | |
this is my code - i have three classes and i will post all since i have no idea what i'm doing apparently [CODE]public class OneTwoTest { public static void main(String[] args) { System.out.println("Welcome to One-Two Match!"); Game g = new Game(); g.play(); System.out.println("Thank you for playing."); } // end … | |
I dont really know specifically what im searching for, which is why i haven't just found this via searching the web. Have you guys come accross or know of any sort of quiz questions like where it gives you a for loop which isn't in the normal format and then … |
The End.