35,618 Topics
![]() | |
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 … | |
I just want to create a file where I can test code idea's in. Basically I want to save a test.jsp file to my file system then open that up with a browser and have it execute the jsp code contained. Is that possible? Here's a simple test that I'm … | |
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); … | |
Hi, I am new to JSP, I have to store images from the clients on to the server, via client input, what will be the best practice to store the images on the server keeping the performance issues in mind as thousands of images will be stored... 1. should i … | |
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 am developing an application for a college website .where i hava take the data from registration form and save it database. i need to use jsp , servlets and entity beans to interact with data base. My approach is .. I created a table in derby database n created … | |
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 … | |
I am having trouble completing This hangman project. It mmost be done using model view controller pattern. Here is what i have so far //Header file declarations import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.FileInputStream; import java.io.IOException; import java.util.Scanner; //Class declaration class HangmanModel extends JFrame implements ActionListener { … | |
I am working on an application in which I select a color from a color selection dialog and click on a graphic shape to change its color. Everything is working fine, but now I would like to change the default arrow-shaped cursor to an eyedropper shape when I am in … | |
Hey I'm in an AP Computer Science class working on classes. We have been working on a project that is a date class that does certain things like setYear, getMonth, getDay, etc. I have gotten all of those to work, except for one. The last one is a boolean method … | |
My Java instructor yesterday gave us a sample test. One line that surprised me was something like [B] if ( m2++ < 10 ) { ………[/B] iow the first thing done is , in effect m2 = m2 + 1, an ASSIGNMENT. Whether the instructor ever actually discussed this in … | |
[B]hey guys: i put a question 2 days ago after having a problem with this equation and u guys helped me alot and solved it but i want to program it in java everything went well but gave me 2 errors here is the code and all information the code … | |
GUI class with the list. What i want to do is have another class add to this list when button is clicked but im not sure how to do that. [CODE] public class LView extends MasterViewPanel{ private static final long serialVersionUID = 1L; private JButton host, join, quit, start; private … | |
Guys I need some help in my activity, I'm making a calculator using NetBeans but I dont know what codes to use be in 0,1,2,3,4,5,6,7,8,9,+,-,*,/,=,(. decimal) all i know is the clear button code[CODE]private void jButton1ActionPerformed(java.awt.event.ActionEvent evt){ jTextField1.setText(""); } [/CODE] My calculator lack of functionality...:( | |
I have been asked to create to check if a word is palindrome or not. But I am facing some problems. After the code you can see the messages that I received from the compiler. [CODE] import java.util.*; public class Palindrome { public static void main(String[] args) { [B]Stack<String> stack … | |
Hi, Kindly help me to resolve this issue... Appreciate your help.. [CODE] <logic:notEmpty name="strataList" property="rangeList"> <logic:iterate name="strataList" property="rangeList" id="rangeList"> <td align="center"> <bean:write name="rangeList" property="min" /> </td> <td align="center"> <bean:write name="rangeList" property="max" /> </td> </logic:iterate> </logic:notEmpty> [/CODE] Could you please let me know is there any option to prevent duplicate value … | |
Hi, I am facing OutOfMemory exception in Java, Kindly help me to resolve this issue, really appreciate your help [U][B]ERROR: [/B][/U]java.lang.OutOfMemoryError: Java heap space [B][U]CODE:[/U][/B] [CODE] public Blob getBlob(String databaseInstance, InputStream inputStream) throws SQLException, Exception { applog.info("Entering getBlob"); InputStream stream = null; applog.info("inputStream : " + inputStream); stream = inputStream; … | |
I'm trying to make my first real project: A calculator, but when I press the "clear" button (the only button i've done so far) the JLabel doesn't go from two to zero, any help would be really appreciated :) code: [CODE]import java.awt.Color; import java.awt.GridLayout; import java.awt.event.*; import javax.swing.*; public class … | |
I am a beginner in programming(java) and want to know, how to do typecasting in it. show me by giving examples. | |
Hi, I am wondering if it is possible to "transfer" a Socket connection to another ServerSocket? So, say I listen for a connection on ServerSocket with port 1111. A connection is established, I know want to use a ServerSocket with port 2222 to handle this connection. Is he possible without … |
The End.