32,204 Topics
| |
Whenever I try to run a program, I get the error message 'Compile is not recognized as an internal or external command, operable program or batch file' Tool completed with exit code 1 Please help me figure out how to solve this annoying issue, as I'm not getting any help … | |
I would like to make a kind of archiver that can uncompress rar files. This project will evolve into a program that will guess the password until it unlocks the file. How would I be able to unzip the file using java, and submit a password if it asks for … | |
How do I write a guess method so that the user can guess the word in hangman? | |
hello i have problem creating a Sequence application that generates a series of random numbers from 0 to 9 until a 0 is generated and then displays the length of the sequence of numbers. the output should look similar to this 3 6 7 8 9 0 Length of the … | |
Hi, I need help with arrays. Here's what I have so far.... [CODE]// The "Prefixes123" class. import java.awt.*; import hsa.Console; public class Prefixes123 { static Console c; public static void main (String[] args) { c = new Console (); String prefix; String word; String sentences; c.print ("Enter the prefix: "); … | |
| Is there a way to improve the below Selection Sort code to make it more efficient? [ICODE] int a, b, smallest, temp; for(a = 0; a < numIntegers - 1; a++) { smallest = a;; numComp++; for(b = a+1; b < numIntegers; b++) { if(Integer.parseInt(list[b].toString()) < Integer.parseInt(list[smallest].toString())) { smallest = … |
Hi folks! I'm trying to wire simple code and so far I'm stuck on ActionListener. My program should contain (JMenu) Menu called SELECT and two options InnerFrame 1 and InnerFrame 2. To debug it I've started using System.EXIT , unfortunately I cant compile my program, I'm receiving an error: "java:48: … | |
hi all, Is there simple example out there where image is made by drawing lines on the panel ,and then print it on paper thank you denny | |
Here's what I have so far.. [CODE] // The "AddingPrefixes" class. import hsa.*; import javax.swing.JOptionPane; public class AddingPrefixes { static Console c; // The output console static char proc; static String prefix; static String word; static String sentences; private void title () { c.print (' ', 32); c.println ("Adding a … | |
When reading or writing to files, what should you have in a try-catch? And should you have a finally? Should I have everything in the try? Like.. maybe create a File variable to check if a file with that name exists etc and throw errors if they do. And then … | |
I have a Java Desktop Application I made and I am now on the process of deploying the application. I tried to use Java Web Start but came up with certain problems. My application is fully working when I start it locally or inside my IDE. But when I try … | |
Ok so i have a little problem which i cant seem to figure out this is what i have: The constructor loads my method that loads a list of employee to show in jTable, but when i place that method in my button it doesn't do anything This is my … | |
Can somebody please help me figure out where I went wrong? This is the problem and I have attached my code. Write a class with a main() method and two static methods. Your program should prompt the user for a single-digit integer. Your program should print out to the screen … | |
First the gui question Right now I have: [CODE]class ExportGUI extends JFrame implements ActionListener{ JTextField fileIN; //Text Field Bull //JLabel fInHelp;//Labels time JFileChooser BpsFile = new JFileChooser(); //File Chooser JCheckBox Check; JButton expButton; //reference button object JButton opnButton; JButton reset; JButton all; //Panels List<JCheckBox> checkList = new ArrayList<JCheckBox>(); JPanel inOut … | |
I'm create a program using java and MySql (jdbc) my problem where I'm start up the program in my customer computer , i must set up MySql program or not | |
Hello anyone, I have code: [CODE]java.lang.System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true"); SSLContext ctx; ctx = SSLContext.getInstance("TLS"); ctx.init(new KeyManager[0],new TrustManager[] { new DefaultTrustManager() }, new SecureRandom()); SSLContext.setDefault(ctx); Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider()); URL url = new URL("https...."); HttpsURLConnection conn = (HttpsURLConnection) url.openConnection(); conn.setRequestMethod("POST"); conn.setDoInput(true); conn.setDoOutput(true); DataOutputStream output = new DataOutputStream( conn.getOutputStream()); output.writeBytes("data"); output.flush(); output.close();[/CODE] How do I edit … | |
Hello I am having issues with a script.. I am trying to have an array carry a bunch of vimeo codes. What I want to do is make it so that when someone clicks a button created by the array they are able to see a vimeo script open in … | |
Working on a simple banking program and it doesn't compile. Worked perfectly when everything was in main, then i was told to divide into methods( where everything went wrong ). The errors im getting are: C:\Users\DJ3\Desktop\School\Minilab5.java:30: illegal start of expression } ^ C:\Users\DJ3\Desktop\School\Minilab5.java:67: illegal start of type switch (userChoice) ^ … | |
Hello everyone, i thought of this question and i would greatly appreciate some pointers on it. I have 2 simple Java Projects which are GUI based. One writes some information to a text file. The other reads the text field and displays it on the GUI. My question: Is it … | |
Hello Friends, I need a hint to auto complete the combobox. I have two table SpeciesMaster and BreedMaster (Access Database) In the java code on the action Listener of the Species combo Box the breed details gets populated in the breed combobox. But now I want to filter the breed … | |
Is there any way that i can create a gui which contains an excel diagram sheet?not a jtable.. | |
[CODE]import java.util.Scanner; public class Sales { private String salespersonName; public Sales( String name ) { salespersonName = name; } public void setSalesPersonName( String name ) { salespersonName = name; } public String getSalesPersonName() { return salespersonName; } public void displayMessage() { System.out.printf( "Welcome to the sales calculator for\n%s\n\n", getSalesPersonName() ); … | |
[CODE]// The "StringReplacement" class. import java.awt.*; import hsa.Console; public class StringReplacement { static Console c; // The output console public static void main (String[] args) { c = new Console (); String word; String word2; String sentences; int i; c.print ("Enter the word to be replaced: "); word = c.readLine … | |
Hey, DW. I really need to know how to combine two images, into one image, but I don't want to draw it to the screen, and I don't want to save it to a file. It should look something like this [CODE] Image img1 = new ImageIcon("C:\\flying.png").getImage(); Image img2 = … | |
Write a program that launches 100 threads. [COLOR="Red"]Each thread adds 1 to a variable sum that initially zero. You need to pass sum by reference to each thread. In order to pass it by reference, define an integer wrapper object to hold sum[/COLOR]. Run the program with and without synchronization … | |
I am trying to store the numbers of a text file into a 2D array.. Here's the text file: 1 2 3 2 3 4 4 5 6 But i get the error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2 at BankerAlg.main(BankerAlg.java:30) Process completed. Here's the code i made: [CODE] import … | |
I have created a window containing only one button(park1). All I need is a new dialog(with "OK" and "Cancel" buttons to open when I click on park1. Thanks in advance. [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; class MyWin extends JFrame implements ActionListener { JButton park1; MyWin() { setSize(450, 500); … | |
new in programming and really need your help to code interfaces of applications using j2se | |
Hello forum, Vaironl here. I believe this questions has been answered before, but I cannot find the answer.. weird. I have a class which is called panel and extends a JPanel and a paint method. For some reason my Jlabel is not appearing, I read common painting problems, and tried … | |
I want to modify the below code to read the Polynomial Terms from a text file (vs. hard-coded values) Furthermore, read data from text file in the format: P1 = 3 5 1 -1 0 8 P2 = 5 6 2 -1 1 7 0 -4 etc... Name the values … |
The End.