32,204 Topics

Member Avatar for
Member Avatar for needhelpinjav

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 …

Member Avatar for Sadun89
0
198
Member Avatar for sirlink99

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 …

Member Avatar for sirlink99
0
1K
Member Avatar for Mike Tyson

How do I write a guess method so that the user can guess the word in hangman?

Member Avatar for hfx642
0
51
Member Avatar for javabeg123

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 …

Member Avatar for jazz_vill
0
107
Member Avatar for Daigan

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: "); …

Member Avatar for Daigan
0
143
Member Avatar for mrkm1188

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 = …

Member Avatar for mrkm1188
0
152
Member Avatar for grako84

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: …

0
121
Member Avatar for dennysimon

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

Member Avatar for dennysimon
0
124
Member Avatar for Daigan

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 …

Member Avatar for NormR1
0
177
Member Avatar for sha11e

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 …

Member Avatar for sha11e
0
141
Member Avatar for jazz_vill

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 …

0
134
Member Avatar for pxndx

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 …

Member Avatar for jazz_vill
0
157
Member Avatar for javabeginner1

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 …

Member Avatar for javabeginner1
0
225
Member Avatar for th3b3n

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 …

Member Avatar for stultuske
0
233
Member Avatar for mohamed moamen

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

Member Avatar for jwenting
0
142
Member Avatar for innspiron

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 …

0
73
Member Avatar for rievan

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 …

0
80
Member Avatar for Unsated

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) ^ …

Member Avatar for Unsated
0
420
Member Avatar for TehCPP

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 …

Member Avatar for TehCPP
0
165
Member Avatar for poojavb

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 …

Member Avatar for poojavb
0
1K
Member Avatar for libathos

Is there any way that i can create a gui which contains an excel diagram sheet?not a jtable..

Member Avatar for peter_budo
0
98
Member Avatar for mmxvoid

[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() ); …

Member Avatar for mmxvoid
0
211
Member Avatar for Daigan

[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 …

Member Avatar for Daigan
0
181
Member Avatar for glut

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 = …

Member Avatar for glut
0
1K
Member Avatar for mrar85

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 …

Member Avatar for mrar85
0
2K
Member Avatar for matharoo

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 …

Member Avatar for matharoo
0
2K
Member Avatar for slasherpunk

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); …

Member Avatar for mKorbel
0
3K
Member Avatar for ragira

new in programming and really need your help to code interfaces of applications using j2se

Member Avatar for JamesCherrill
0
35
Member Avatar for vaironl

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 …

Member Avatar for mKorbel
0
2K
Member Avatar for javaNewb37

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 …

Member Avatar for stultuske
0
335

The End.