31,001 Topics
| |
This is what I have in the main class: public static void main(String[] args) { final login login = new login(); login.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); login.setVisible(true); login.setResizable(false); login.btnEnter.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { login.inputText.getText(); new crosswordWindow().setVisible(true); login.dispose(); } }); } *there is a third class called login, where the jTextField is. The … | |
| I am currently busy working on an instant messenger program using the UDP `DatagramSocket` and `DatagramPacket` instead of the usual connection-based `Socket` and `ServerSocket`. I need the server-side of the application to check the online status of its clients. I have attempted doing this by connecting to the server using … |
How do I display the individual integers from the scanner input stream for example if the user enters 500 I would like to display it as 5, 0, 0. Here is the code guys import java.util.Scanner; public class Digit { public static void main(String[] args) { int number, i = … | |
public void setState(String state) { if(state.length() <=3) this.state = state; else this.state = state.substring(0, 2); `}` | |
Hello All! I'm reviewing Java (SE, ver 8) and I'm using one of the "Teach Yourself Java..." books. I'm up to the chapter on Java Web Start and I'm stuck. I'm trying to run the sample app (a .jnlp file), but I get an error that reads: "Application Blocked by … | |
Hello guys. Im having trouble figuring out why I keep getting an error saying the compier cant find my class. its all the way down at the end of the code called circle class. Any suggestions? package circle.pkg7.pkg2.app; import java.util.Scanner; /** * * @author Jay */ public class Circle { … | |
import java.util.ArrayList; import java.util.Collections; public class PersonMaker { public static void main(String[] args) { ArrayList<Person> personAL = new ArrayList<Person>(); ArrayList<Address> addressList = new ArrayList<Address>(); Address c0 = new Address("2100 Pleasant Hill road", "duluth", "GA", "30096"); Address c1 = new Address("3392 fairway oaks", "lawrenceville", "Georgia", "30044"); Address c2 = new Address("4493 … | |
import java.util.ArrayList; import java.util.List; public class Task7 { static int count=0; String arr[]=new String[40]; /** * * @param list * @return an array consisting of vowels from the passed character array, * in the order they appear. for example, if list = {'t','h','e','s','a','u','r','u','s'}, * the method returns {'e','a','u','u'} */ public … | |
import java.awt.Frame; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import javax.media.opengl.*; import javax.media.opengl.awt.GLCanvas; import javax.media.opengl.glu.*; import com.sun.opengl.util.Animator; import com.sun.opengl.util.FPSAnimator; public class Object3D implements GLEventListener, KeyListener { GLProfile glp; GLCapabilities caps; GLCanvas canvas; GLU glu; float rotX = 0.0f; // Rotate screen on x axis float rotY = 0.0f; // … | |
My build.xml can run junitTest well but when I tried to build with cobertura instrument, JunitTest failed, Why? <target name="instrument" depends="compile"> <echo> ====== run target instrument ==== </echo> <!-- Remove the coverage data file and any old instrumentation. --> <delete file="${junit.dir}/cobertura.ser" /> <delete dir="${instrumented.dir}" /> <!-- Instrument the application classes, … | |
can anyone say best way to convert java class file into java file appreciate for your help thanks | |
I am trying to make a code that makes a random point cloud that changes every five seconds for a minute. I have it so that it makes the inital cloud, but I am stuck on how to make it change every five seconds. private class newCloud implements ActionListener { … | |
<head> <!-- //In header section of the page add below url code: --> <!-- Sesion time out and session expiry url starts here --> <s:url id="sessionExpirePopUp" action="sessionOutCiscoGSS" namespace=""> </s:url> <s:set name='sessionExpirePopUpNew' value='#sessionExpirePopUp.replace("&","&")' /> <!-- Sesion time out and session expiry url starts here --> <script type="text/javascript" language="javascript" src="<%=request.getContextPath() %>/jsp/js/jquery.js"></script> <script … | |
Hi. The Timer displayed is 1 hr (HH:MM:SS) in decrement order. I have to display a pop out when 50 mints complete after that remaining 10 mints one pop up should display saying 10 mints with 0 sec. After that for every 2 mintues the pop up appear showing 2minutes … | |
I'm having trouble working these last few kinks out my progarm. It would be greatly appreciated if you can help me out from here. import java.util.Date; import java.util.Scanner; import java.io.FileReader; import java.io.FileNotFoundException; import java.io.PrintWriter; import javax.swing.JOptionPane; import javax.swing.text.BadLocationException; public class aCircle { public double circumference(double cRadius) { return cRadius; } … | |
I am a newcomer to java and jdbc. I am currently trying to develop a web application in which the user can upload a spreadsheet to the form. Is there any way in which contents of the uploaded spreadsheet can be saved to the database? I am working in eclipse … | |
Please I need a java expert to help me with the code and algorithm that deletes duplicate element from an array. I have written a programm to do this as shown below using my own algpritm. Though it is working but I think my code is too long for this … | |
Greetings, I'm working on a class project for fractions and I'm stuck and cannot figure out where to go from here. We have a mandatory driver file we aren't supposed to change. See below for example output and the output I am actually getting. **Sample Output** Enter numerator; then denominator. … | |
I am using Eclipse helios and Android 4.1.2 i have followed the following documentation https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw and done the coding exactly as described in tutorial.when i run my app on emulator it shows "This app wont run unless you update google play services" but on real device which is sony xperia … | |
Addressing last weeks Securi-Tay conference hosted by the Abertay Ethical Hacking Society in Scotland, Stephen Tomkinson from the NCC Group detailed how Blu-ray players can do more than play videos; they can open up a new attack surface for the hacker. Tomkinson demonstrated a new tool that had been released … | |
Greetings! I'm reviewing Java, in an effort to enhance my programming skills. I'm utilizing the book "*Teach Yourself Java in 21 Days*" and I'm currently learning about Java Web Start. I'm not sure I full understand how I'm supposed to use Web Start (based on the samples in the book) … | |
Hello everyone, I am a little stuck an this simple task. I have created an html with a form that has 2 user input boxes and 4 button +,-,*,/,. Basically a simple calculator. And I have a jsp to process the form. I am trying to now create a java … | |
please check the following error while running the BluetoothLEExplorer.Droid project from http://developer.xamarin.com/content/BluetoothLEExplorer/. D:\robotics programming\ys u\BluetoothLEExplorer_2\BluetoothLEExplorer.Droid\obj\Debug\android\src\bluetoothleexplorer\droid\ui\controls\ScanButton.java(3,3): Error: error: no suitable constructor found for Button(Context,AttributeSet,int,int) super (p0, p1, p2, p3); constructor Button.Button(Context) is not applicable (actual and formal argument lists differ in length) constructor Button.Button(Context,AttributeSet) is not applicable (actual and formal argument … | |
hey Friends Please let me know that how can i do the program of Airplane Seating, please help me | |
I have being trying to implement GA in java. please ccan anyone guid me on how to go about implementing it for a school that offer 13 subjects with 8 periods per day for 5days. They have 7 staffs of which some of them teach morethan one (1) subjects and … | |
File f=new File("c:/'.'"); // I know about file class just didn't understand what kind of file "c:/'.'" is. File strRoot[]=f.listRoots(); | |
I'm in an introductory programming class, and one of our assignments is to complete a Rock Paper Scissors program using nested switch statements First of all, this method might be completely wrong in the first place, but currently every time I compile it it says I'm missing a return statement … | |
I am new to java client and server and I have been given a task to complete which does the following below: Client: c1. Connect to server via a connection-oriented socket. c2. Read (from socket) and display the prompt message sent (see step s2 in server) by the server. c3. … | |
scan through this API there should be a option for scan with OCR, means all content will save in database as a txt Once scanning done that become a image | |
Modify the Week Two Java™ application using Java™ NetBeans™ IDE to meet these additional and changed business requirements: The company has recently changed its total annual compensation policy to improve sales. A salesperson will continue to earn a fixed salary of $75,000. The current sales target for every salesperson is … |
The End.