35,617 Topics
![]() | |
I have to fix programme where the programme asks the user for an input of a random text. When the text is written in the programme will change specific letters like a to be c so I am a man would be I cm c mcn public static void main(String[] … | |
My interactive educational software has applets embedded in webpages. All was fine until I installed the latest Java7. Now all the applets are blocked, with some comment about my security settings being responsible for the blockage. I've tried everything I know to no avail. How do I get my applets … | |
I'm not able to get the printout. here is the code public class Billing extends Frame implements ActionListener,Printable { JButton printbtn = new JButton("Print"); } public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException { if (pageIndex > 0) { return NO_SUCH_PAGE; } // User (0,0) is typically outside … | |
Hello, The program below has two JPanels. The first JPanel, panel contains the labels, buttons and combobox. The second JPanel, panel_1 has the image.I am using BoxLayout to line up the belows vertically. The issue I am having is when I run the program, the compoments of the panel do … | |
Hello, I got a homework. This is too difficult to me. Because, I have just learned about the introduction of Java Networking. I still didn't get a enough material about Java Networking programming. This is the task that I got: [https://dl.dropboxusercontent.com/u/61841244/CS1103%20-%20T1%202013-2014_%20Lab%2011%20Unit%207.pdf](https://dl.dropboxusercontent.com/u/61841244/CS1103%20-%20T1%202013-2014_%20Lab%2011%20Unit%207.pdf) This is my question : - what is the … | |
I want to execute WordPad using the code below. It runs fine on my pc. But failed to run on other pcs. String program = "C:\\Program Files\\Windows NT\\Accessories\\wordpad"; String file = "srcFiles\\Resources\\readme.rtf"; //This is the path to the file i want to open with wordpad. Runtime load = Runtime.getRuntime();; try{ … | |
Hi This app is supposed to let a person draw depending on their choice of Shapes and color. I cant figure out what is going wrong. The colours and shapes barely work and the mouse position is not showing up at all. Mouse listener that tracks mouse position seems to … | |
Question regarding concurrency. Imagine 10 different doGet() requests from 10 different users around the world called within milliseconds of each other to a servlet called LoginServlet.java. Inside the servlet's doGet() method is a call to DbUtil.getConnection(). The DBUtil class is static and the method getConnection() is also static. What happens … | |
Hi. I was wondering if someone could explain to me how to make some new node point to the first element in a list. | |
Hi. I need help with my size method. I am using a single-linked list. I tested my code and it returns 0 all the time. /** This method returns the size of the current list. <br> * If the current list has no elements,it is empty. <br> * * @return … | |
This a question please schools grades ------- -------- havard 90% with this table, i want to select the information in each column concatenate them and ouput the results in a textfeild. sample output = havard/90% so can you declare a column in mysql as a variable in java? if yes … | |
I have the following code that prints out something like a database using a velocity engine and the output is printed to a console. Though what I'm asked is to generate HTML code using a Velocity template. The **Velocity Test Class** import java.io.StringWriter; import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; public … | |
First, just to clear this up, I did not post this is the wrong place. I know the difference between "Java" and "Javascript" I'm working on a project where I want to allow a simple, no intense programming required, way for users to create custom functionality. This is a simplified … | |
Hello, In the following programs, I am trying to add multiple clients. The Client program remains unchanged. For the Server program, I am using a thread (custom class implements the Runnable interface) to open a new socket and process every client request. My questions follow the programs. **ChatServer.java:** import java.net.*; … | |
I just begin studying Java programming language and I want to solve cubic equation, but I do not know how to solve it and count the cubic root in java. Could you help and guide for me, please?? Thank you so much! | |
Hi am new to jsf and primefaces. I have a drop down list which contain high,medium,low,other(please specify) When user select other(please specify), i want a textbox to be displayed. i guess there should be an if statement. anyone can help..i got no idea how to write an if statement in … | |
Hi. Everyone. I have a single-linked list and I need to implement an add method. I need to traverse the list (it needs to be in increasing order) and place the parameter object inside. There won't be duplicates. How do I go about doing this? public void add(G element) { … | |
Hello, I am new to JSP and I have to create a registration form, so when the user fills out all the information and clicks submit, the information should be stored in cookies. I cannot use database to store user information. Also after the user registers, he/she has to login … | |
Instead of using synchronization, I used AtomicReference as a substitute: private AtomicReference<HashMap<String,String>> a = new AtomicReference<HashMap<String,String>>(); public String initPool(HashMap<String,String> latest){ HashMap<String, String> old = a.get(); if(old!=null){ Set<String> key = a.get().keySet(); for(String val: key){ if(!latest.containsKey(val)){ a.get().put(val,latest.get(val)); return returnObj(val); }else{ return returnObj(val); } } }else{ a.compareAndSet(old, latest); return null; } return null; … | |
hello friend i like to make program in which user can selecte product and they can choose on e or more product by clicking add button now i want to save this firstly temporary all selected product when they click on add button and when user click on submit it … | |
Hi, i just want to finish my j2ee application that have to receive many sms from mobile users of network operator and store these on database. I try to google it but i found nothing about this. Please, i just need an orientation step by step (Excuse me for my … | |
Hi all, I have been told that variables containing objects are basically just references to a memory locations that contain the object data. And doing something like this: TestObject o1 = new TestObject(..); TestObject o2 = o1; would make a new variable o2 that will simply point to the same … | |
Hey guys I had an assignment to recursively write the Towers of Hanoi then test it. I did not have too much of an issue getting the program written But I am not sure what the book means by test the efficiency do they want the number of moves my … | |
Hello, im having problem with my output =/ Everytime i run my program is not giving me the right output so, this is my assaigment. Consider a class that keeps track of the sales of an item. An object of this class will have the attributes: Number Sold Total Sales … | |
I am having a problem deleting nodes from my Binary search tree. What I have so far does part of what it is supposed to do. I read in an input (paragraph of text) to create the tree (organized via ASCII character values). I make it, then print out all … | |
Hi, I am working on a program that prompts the user for answers to a quiz. The answers can only be a, b, c or d and they are saved to an array which I later compare to my answer key array. Below is the method I have written to … | |
I saw a tutorial from a site where it showed the use of `ArrayBlockingQueue` as a thread-safe concurrent data-structure . Just for learning purposes , i tried to build something similar using synchronized and wait-notify methods in java. I'm hoping someone could guide me to some improvements and point out … | |
hey fellas I m new to mobile agents please help me in developing addition program in aglets. Thankyou . | |
Hi everyone, Hope u all in good shape. I'm doing a simple project integrating mobile agents using aglets with intrusion detection system using snort., all these are done with linux fedora core 5 platform. The basic idea is, when snort detect an intrusion, an aglet will read the log file … |
The End.