36,051 Topics
![]() | |
Hi Dw There is a project I'm doing but I'm doing it in VB.NET I want to know now how can I write a program in jave that will govern the CD-RW and if the disc is inserted on let say a DVD player the program will detect that the … | |
So I have to make a code that asks the user how many times it wants the word "nonsense" to be printed on a new line, I managed to get it to work but its reverse, if i write 100 it prints once and 1 it prints hundred times, how … | |
Dear i want to make a program i which when Pressed UP Arrow key cicle start moving up and when pressed DOWM key circle moves Downword Similarly left and right i have draw circle and also implements Key Listner and can anyone give me ideo how i do this task … | |
So, this code is giving me some errors, any idea? private void pintarMobs() { JButton boton = null; Component[] botones = pnCastillo.getComponents(); for (Component c: botones){ boton = (JButton) c; int ac = Integer.parseInt(boton.getActionCommand()); int a = 0; Random r = new Random(); String foto = null; if( ac != … | |
Thanks to a federal copyright law ruling on Monday by the Library of Congress, jailbreaking your iPhone doesn’t have to be kept to the underground forums like it's alcohol during a digital prohibition. The process is now completely legal under US law. Grab a glass of e-freedom![ATTACH]16137[/ATTACH]The resulting decision was … | |
How would one make one word of out put bold. I am making rock paper scissors using threads and I want to make the choice of either rock, paper, or scissors bold. So for example the output of the program would be "Player 1 chose **Rock**. How can I do … | |
I have written this code to find the cycle in graph public boolean hasCycle(int i, int[][] mat) { visited[i] = 1; // for( int i = 0; i < numNodes; i++ ) for (int j = 1; j < mat.length; j++) { if (mat[i][j] == 1 && i != j) … | |
Hi am creating a java web application using jsf framework. I generate report using BIRT report. i create a table but when i view the report the line and border of the table is not displaying. how to make it appears? Anyone can help? | |
hey how can I handle no-mapping found exception in spring dispatcher?? so that, if no-mapping to a controller is found in the dispatcher, I would like to redirect the user to a separate Resource not found page Suppose I have only 2 pages in my web application, "/about", "/help" and … | |
Ok, I need help on a for loop nested program using for loops, I'm trying to use a patten that goes like this: 123456 12345 1234 123 12 1 but when I try it, it goes like this: 654321 65432 6543 654 65 6 This is my program: public class … | |
Hey guy, I am developing an enterprise application using JavaEE7 EJB 3.1 that is "Fast food restaurant management". Now I am writting a framework for user to create many types of event they wish. Let's say, like KFC or McDonalt, they usually apply many event to discount their products, or … | |
I am having trouble getting the health deductions from the TaxablePay method to the getNetPay method. I have tried everything I can think of including using a taxablePay class. I am running out of ideas. I have below... 1.The program description(what i want the program to do). 2.The expected output … | |
hai I have Sunjava 7 installed in my pc, but when i run my java programs in my linux it won't works it's again saying to install java what should i do | |
Hi, I'm trying to extract the contents of a web page using htmlunit 2.9 I sent the home page URL through Webclient and got the login page from the application.I submitted the form by filling the user ID and password fields. The HTMLpage data that I received from the application … | |
i need help with this: Write a Java program that allows the teacher to calculate the grade for a student. Specification: 1.prompt the user to enter the Student ID number, first name, last name, and the average score for each of the following categories. o Assignments (worth 50%) o Quizzes … | |
I can't seem to center align my background image. I am new to php, css, and java coding but finding it necessary in this day and age. Here is the code. I hope this will help. <style> body{ background: url(http://dsninformation.com/images/magic.jpg); background-repeat: no-repeat } .button { display : inline-block; cursor : … | |
I am trying to connect to a database on button click on a jsp page. The value from the textbox of the html page should be captured and used to satisfy the conditions necessary to display the database values. I am using HTML,JSP,Jquery and Ajax. My database is MySql. I … | |
I am writing a application.and i need to draw line in jpanel.but it is crash when jpanel add to jframe.this is my code: public class Simplification extends JFrame { JPanel panel; public Simplification(List<List<Integer>> transmitionTable , List<List<Integer>> outTable) { this.setTitle("Simplification Result"); this.setSize(500, 300); this.setLocation(50, 50); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); // do other jobs … | |
I need help with this: -write an application to perform simple arithmetic operations on integers. Specification 1.Name the .java file SimpleMath 2.The program should do the following: ◦Prompt the user to enter five integer values from the keyboard. ◦Display the sum and average of the numbers. ◦Display the quotient of … | |
I'm trying to have the following output of the program: 01/01/2010 But when I run the program I get : 01/01/10 How would I format the date to be like I want? This is the code I have: import java.util.Calendar; import java.util.GregorianCalendar; public class HelloWorld{ public static void main(String []args){ … | |
So this is what i dit. Declared three classes: Main Term Polynom So in Polynom i try to call a "plus" method: i tried this: public Polynom add(Polynom pol){ Polynom res = new Polynom("",0); Term tox = new Term(0,0); for(Term p : Polynom){ for(Term other : pol.Polynom ){ if(p.getDeg()==other.getDeg()){ tox.setCoef(p.getCoef()+ … | |
-=Car Parking Monitoring System=- Hi there folks, i need some idea regarding on the problems that the user might encounter during the transaction is on going. Like for example, the customer might change his mind on parking but he was already timed-in in the system. Thanks for the share guys, … | |
Write a program to compute the computer programming grades of 8 IT students. Randomly create student numbers for each of the students and store each in an array. The program should take the input of (validate the input where appropriate): Names of Students and store them in an array. Addresses … | |
Dear Team, I am writing a Swing application for my project which gets the user information and saves it in a database and then displays in a JTable. I thought like, instead of manually updating the data from our client website, why not read the data from the site and … | |
Error: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at assignment.MainFrame.validateEmail(MainFrame.java:324) at assignment.MainFrame.btnRegisterActionPerformed(MainFrame.java:208) at assignment.MainFrame.access$000(MainFrame.java:19) at assignment.MainFrame$1.actionPerformed(MainFrame.java:80) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3320) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) … | |
I need help with the following This is what I have so far, can someone just note down how they would go about writting the if statement Thanks. /**Returns the result of a card requesting to move through a door. * A move will be successful if: * the rating … | |
Hey guys I recent wrote the deal or no deal game in Java for fun. It currently operates using a Command driven interface where users input numbers based on textual feedback. My aim is to develop this into a full GUI interface, however, I have not met GUI's yet in … | |
I am wanting to measure the performance of an algorithm which I've created, and for some reason the value decreases significantly as I run through my loop | |
This is kind of what I'm trying to do. I'd like to do something, have a mini 1 second wait then do something else. The below example illustrates... private void someTypeOfMouseClicked(java.awt.event.MouseEvent evt) { handleMouseClick(j); } private void handleMouseClick(JLabel j) { j.setText("hi"); Thread.sleep(1000); j.setText("yo"); } What happens is that it takes … | |
How to break security when you implement encapulation in java programing? | |
![]() | A NetflixFileReader class that handles reading the provided data file. For each line of the file, a new Media object (either Movie or Series) should be created and added to a list of Media objects. This class should include a method that returns the finished list. |
HI, I need to have a captcha in my jsp page. The captcha code is ready and it works perfectly well when the user enters the value. It reloads the same page if the captcha enterd is wrong. I need to navigate to the next page if the value is … | |
I am making a programe based on socket programing in which client can download one of the listed books from server. I have come up with this code but the problems with it are: 1) It doesnt downloads pdf file greater than 1MB. 2) It allows client to download 1 … | |
Can someone help me write a program to compute the computer programming grades of 8 IT students. ● Randomly create student numbers for each of the students and store each in an array. The program should take the input of (validate the input where appropriate): ● Names of Students and … | |
double compute() { double monthly, acumulation; for(int y = 1; y<5; y++) { monthly = (Cost * numYears) / residual; acumulation = (monthly * y); return acumulation; } } this is function i wrote to compute monthyly depreiation and accumulation. but the error i get is missing return statemen and … | |
Hai everyone. I am new to this forum. Can anyone tell me the scope of jobs in java for the nest 10 years. | |
I am completely lost right now. I don't get what the questions are trying to say and I want to know if someone can give me pseducode or just a small example on how to start them off because like I said I'm lost. I'm not trying to get answers … | |
In my high school programming class we are learning Java. We have been assigned into groups of two and have freedom to choose any project. I was wondering if anyone could come up with some ideas(games) for beginners like us. We have worked a bit in Java, I would say … | |
| |
Hello. I am looking into mining API Usage Patterns for a project I am trying to work on. I would like if possible to avoid going through the trouble of building the (whole) tool from scratch as it will take quite some time. What I would like to avoid if … | |
Let's say that i have an array of objects. So, I need to delete the count objects starting at the given index. Make sure to compress myObjects and update currentObject. You must also verify that the given index exists in myObjects and that there are count entries starting from there. … | |
Hi, i have some RMS data in my memory, i want to store it and draw it into the scrollable UI canvas? How do i do it? | |
Is it possible to create an application that prevent users from running certain applications for a certain period of time using java? Like when a user logs in the pc, only applications that was allowed in his access level would run. Thanks in advance :) | |
Let's say that i have an array of objects. So, I need to delete the object at the given index and make sure to compress myObjects and update currentObject. Also, I have to verify that the given index exists in myObjects. This is what I got: NOTE: I will just … | |
Hi, I have a quick question. I am making a hang man game for project (I am at university as a computer science major), I have completed most of the game but have run into one small issue which has been given me a big problem. Right now I am … | |
**I have a half complete coding which basically comes down to a gui interface. The problem is that I don't know how to get it working as ticket vending machine with fixed rates and fixed amount of cash being able to put in. So, far, I've done up to calculating … | |
I am working on this editDistance program in Java, but I cant figure out how to return the new strings..... The program is returning the editDistance, but everytime a char doesnt match I want to delete it out of the string, in the end when I call printDistance(), I want … | |
Hi, Recently i upgraded my application java version from jdk 1.5 to 1.7. I am using ajaxanywhere as ajax thirdparty jar for ajax work. After upgrading jdk version, jar is not working properly. It is not updating referesh zone after ajax call. url of ajaxanywhere [Click Here](http://ajaxanywhere.sourceforge.net/) Kindly help me … ![]() | |
In this main class I used a **ListIterator** variable, **hasnext()** and **next()** method to print LIST memebers. I created litr variable of ListIterator, I performed some functions on the list i.e, sorting(ascending and descending) etc. I used the same litr variable and a while loop for outputing the list again … | |
`Inline Code Example Here` import java.io.*; import java.util.regex.*; String []str = {"123","0959","75443","19908","1","11879","1119","276","566777","7","675","4435","54","6588","99","124","78"}; String filename = "temp.text"; try{ File file = new File(filename); FileWriter fw = new FileWriter(file); for(int i=1;i<=str.lenght;i++){ // Start for BufferedWriter bw = new BufferedWriter(fw); bw.write(str); bw.newLine(); } // End for bw.close(); }catch(IOException ex){ System.out.println("Error.."+filename+" "); } public … |
The End.