36,051 Topics

Member Avatar for
Member Avatar for Varunkrishna

Hi all I wish to start learning Spring 3 mvc how do I get it started with either Gradle/maven in Spring Tool Suite (STS). What is the easiest way to learn Spring 3 mvc. I know that there are many tutorials out there, but I could not find the right …

Member Avatar for peter_budo
0
83
Member Avatar for Nesre

Hello everyone, Can you help me with the following problem. I am working on Eclipse IDE. I created new Dynamic Web Project and when I tried to create a Servlet class though every required package is imported it gives a compiler error. The following is a sample code. import java.io.*; …

Member Avatar for Nesre
0
184
Member Avatar for sankubha

Now am working with java application . I have to connect server and client through No-Ip Duc host.Is it possible or not??? Server side code: ServerSocket ss=new ServerSocket(5223); System.out.println("Waiting for client"); Socket soc=ss.accept(); System.out.println("Connected"); client side code: Socket soc=new Socket("rmcsnoiptest.ddns.net", 5223); This is what i tried.

Member Avatar for JamesCherrill
0
364
Member Avatar for Varunkrishna

I am using PrintWriter to write the input from the standard input to a file, here I am trying to create an ascii table in the text file, but there is no proper alignment of the table in the text file. Here is my code guys. package code.practise.MyIdeas; import java.io.FileNotFoundException; …

Member Avatar for Taywin
0
260
Member Avatar for Slavi

Not sure how to explain what is going on but after some time scene builder just won't display the fxml file that I am trying to modify further. It happened a couple of times so far and its really annoying because nothing can be changed. Yes, I do see scene …

Member Avatar for Slavi
0
98
Member Avatar for toring

Hi, I need some help please i could not show the balls,when my pacman is moving,i want my pacman will through balls when it's moving.but i could not show his balls,can you please help me what is wrong or missing in my code. I appreciate someone can help me import …

Member Avatar for JamesCherrill
0
232
Member Avatar for Varunkrishna

Hi all Here is my snippet for(int i = 1;;i++){ System.out.println("Please enter the name:"); name = input.nextLine(); System.out.println("Please enter the email:"); email = input.nextLine(); if(!email.matches(EMAIL_PATTERN)){ System.out.println("Please enter a valid email.\nThe details are not saved please start from the beginning."); i--; // break; continue; } else { printwriter.println("|"+i+")\t|"+name+"\t|"+email+"\t|"); printwriter.println("+-----\t+-----\t+-----\t+"); } if(i>=1){ …

Member Avatar for Varunkrishna
0
121
Member Avatar for sumaya_ak

import javax.swing.JFrame; import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.FlowLayout; import javax.swing.JPanel; import javax.swing.JLabel; import javax.swing.JButton; import javax.swing.JTextField; import javax.swing.JTextArea; import java.awt.event.*; import java.awt.Color; import java.awt.Font; import javax.swing.border.Border; import javax.swing.border.TitledBorder; import javax.swing.JToolTip; import javax.swing.JTextArea; / public class Swing extends JFrame implements ActionListener import javax.swing.JFrame; import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.FlowLayout; import javax.swing.JPanel; …

Member Avatar for stultuske
0
173
Member Avatar for Slavi

I am following [this](http://code.makery.ch/java/javafx-2-tutorial-part1/) tutorial to get into JavaFX using scene builder and so far I really like it as the person who made it explains things in deep detail. I finished the first part and tried executing the code so far, but it returns multiple errors. Here is more …

Member Avatar for Slavi
0
2K
Member Avatar for ianian944

Hi I am getting a **HTTP Status 500 - An exception occurred processing JSP page /registration.jsp at line 15** error. The page is a registration jsp page that submits the following parametres into the database. However there are no hints in Eclipse as to what caused the error. Can someone …

Member Avatar for jwenting
0
303
Member Avatar for subhraakasuny

Hi Team, I am beginner in Java. I am trying to prepare report using Java,the code will generate a Microsoft Word Document and add some text and images in it. I am using Apache POI for this.I am able to create and add text in the doc file and the …

Member Avatar for subhraakasuny
-1
8K
Member Avatar for pwolf

I have just started looking into vim, and It seems very cool indeed ! However, I am not sure whether I should use it for everything or if I should use an ide with a vim plugin. I am interested in learning libgdx/android and google glass stuff. So which would …

Member Avatar for jwenting
0
715
Member Avatar for Benny_1

I'm new in java, so I'm not very good at it yet and my teacher has stumped me. We are supposed to make a bot for a game called snacktime, which is usually user controlled. # About Snacktime: # * There are a maximum of 16 snacks layed out randomly …

Member Avatar for Benny_1
0
288
Member Avatar for Alex_27

import java.awt.BorderLayout; import java.awt.Color; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import javax.swing.*; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; public class PanelCenter implements KeyListener,MouseListener import java.awt.BorderLayout; import java.awt.Color; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import javax.swing.*; import javax.swing.JButton; import …

Member Avatar for Taywin
0
1K
Member Avatar for Wandaga1

import java.util.*; import java.io.*; public class stundentGrade { public static void main(String args [])throws IOException{ BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in)); int a=0, b=0,c=0,d=0,f=0, totalNumber=0; //declaration of initialization stars(); //method to call and print stars System.out.println("Enter a list of Exam scores from 0-100" ); System.out.println("use a negative number if you'r …

Member Avatar for Taywin
0
246
Member Avatar for Mr.M

Hi Dw I'm trying to create a server that will handle simultaneous connections from clients and for simplicity I've decided to save data to the text files, it not one text file but there are many text files which will be located on the server. The clients (written in VB5.0) …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Dean_Grobler

Hi there, I'm in the process of creating a utility program that builds a table in a database and inserts the initial data. I'm getting an error stating: java.sql.SQLException: No suitable Driver found for jdbc.odbc.ContactKeeperDB My Code: [CODE] import java.sql.*; import java.io.*; public class MakeDB { public static void main(String …

Member Avatar for jwenting
0
243
Member Avatar for pravin.kamate.9
Member Avatar for ramu bandela

hi i need any java project on spring hibernate if any one have please send it to me

Member Avatar for Taywin
-2
82
Member Avatar for london-G

Hello, I have installed glassfish server with netbeans. I have created a new JDBC Connection Pool and when I ping it I get error message "Ping Connection Pool failed for MyDatabae. Class name is wrong or classpath is not set for : com.mysql.jdbc.Driver Please check the server.log for more details." …

Member Avatar for peter_budo
0
132
Member Avatar for strRusty_gal

Hi Everyone, Thanks for viewing this thread. How do I do the code similar in Java? The syntax for the code below is C#. public class Child : Parent { public Child(String a, String b) : base(c) { } } I would like to seek for your help on Java. …

Member Avatar for strRusty_gal
0
238
Member Avatar for DkgMarine

Hey guys, so i'm trying to learn the basics of Java, i just could not understand this code. public class Puppy{ int puppyAge; public Puppy(String name){ System.out.println("Passed Name is :" + name ); } public void setAge( int age ){ puppyAge = age; } public int getAge( ){ System.out.println("Puppy's age …

Member Avatar for JamesCherrill
0
122
Member Avatar for moaz.amin.37

i want to place a button on upper left corner of JFrame with GridBagLayout.i write this code but it is notwork correctly gbc.gridx=0; gbc.gridx=0; add(b1,gbc); but the button place on center of JFrame why

Member Avatar for JamesCherrill
0
378
Member Avatar for DawnofanewEra

Hello, Can anyone show me how to set width between character in java. I'm looking for something like this. Items NumOfItems Price A 2 $10 B 1 $5 When I use the for loop to make something like the table above it shows something like this. Items NumOf Items Price …

Member Avatar for DawnofanewEra
0
244
Member Avatar for Desmond_1

I noticed a few things about my results from my codes. If I don't key in anything,no matter what I press(the ok,cancel or the x button) It will print out Please enter an integer value cannot be 0 or negative and contiune to prompt me until the I key in …

Member Avatar for mKorbel
0
668
Member Avatar for moaz.amin.37

hello to all i have problem about button events the problem is that if i handle an event of button and show again a window(result of event) that also has buttons then how to handle events of buttons of second window please help me

Member Avatar for mKorbel
0
168
Member Avatar for reuben_1

I want to play Offical Crafting Dead on my mac from my technic launcher but all I get is a white/grey screen which does not move or do anything. I would really like to play it and here is the console script... [B#439] Analytics Response [runModpack]: 200 [B#439] Java HotSpot(TM) …

Member Avatar for rubberman
0
370
Member Avatar for MasterHacker110

I was looking around on the web about robotics programming, especially the Lego mindstorm EV3. I was looking at what programming languages this platform supports. I saw that you can program it in Java ME(understandable as Java is everywhere today) and in C#. I thought that C# was a windows …

Member Avatar for MasterHacker110
0
621
Member Avatar for hwoarang69

I am getting a null pointerexception and I am not sure why. I tried debuging it by adding a system.out.print statement like so: System.out.println(GameKeys.mouse[pointer]+"-"+pointer); The output from this statment was: "null-0" # Error # Exception in thread "LWJGL Application" java.lang.NullPointerException at com.ia.df.manager.GameInputProcessor.touchDown(GameInputProcessor.java:34) at com.badlogic.gdx.backends.lwjgl.LwjglInput.processEvents(LwjglInput.java:300) at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:200) at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114) ## Gamekeys …

Member Avatar for JamesCherrill
0
329
Member Avatar for Doogledude123

I am getting a NPE on `a`. I have no idea why the array would be null, but heres the relevent code for it. public void setAbility(Ability[] abilities) { for(Ability a : abilities) { sb.append(a.getName()); } pAbility.setText(sb.toString()); } Method called here: Pokemon sPokemon = Pokemon.getPokemon(sender.getValue()); ... pController.setAbility(sPokemon.getAbility()); Passed getAbility(): public …

Member Avatar for Doogledude123
0
298
Member Avatar for nibiruisaplanet

It's a code to calculate age from today's current date. I know I'll have to use #include <ctime> But I have no idea what I would use for the rest. Here's my code: package practicing; import java.util.Calendar; import java.util.Date; import java.util.Scanner; public class FindRelativeAge { private static Calendar calendar = …

Member Avatar for vijayan121
0
362
Member Avatar for screenedcreamy

I have acode review checklist which I would like to automate, Could anyone suggest me how i could get started with this. I would like to create a tool which takes in java extensions and reviews based on custom review check. Would this be time consuming?? any insights on how …

Member Avatar for stultuske
0
256
Member Avatar for liltrig3

Hi Everyone. I Really Need Urgent Help To Create A Paint Application In Java Using Applets Or The Swing. Its Really Urgent. I Have Been Trying To Code This For Like Week Now And I Am Just Left With Five Days To Submit It. Thsi Application Should Be Able To …

Member Avatar for stultuske
0
4K
Member Avatar for thegreymatter

Hi recently while trying to solve a core Java algorithm question I got trapped into a problem. Let me explain the puzzle. > There is a series of numbers. where difference between any consecutive > numbers is either a or b. The 1st number of the series is 0. Our …

Member Avatar for JeffGrigg
1
1K
Member Avatar for brittney_2

I need help with my constructor that should call for all the user inputs, for example their first name, and the information gets checked to make sure it's valid. For example the name is all letters, and the identifier is actually 9 digits, etc. I can set the default constructor, …

Member Avatar for brittney_2
0
239
Member Avatar for preetchannay

hello to all..., i am working on a project and there i am facing a problem of adding pictures to a label.In my project its like that.. i have a textfield ,a button and a label. When i write the file name in the textfield and then after clicking on …

Member Avatar for preetchannay
0
142
Member Avatar for Lee_8

Can anyone help me to write java program? I'm using BlueJ for this assignment. This assignment is to write a program to calculate loan repayments. Banks and/or finance companies loan customers money (usually called a mortgage) so they can make large purchases (such as a house or a car). Each …

Member Avatar for JamesCherrill
0
816
Member Avatar for Desmond_1

import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.JFrame; import javax.swing.SwingUtilities; import javax.swing.Timer; @SuppressWarnings("serial") public class OnClickLesson extends JFrame { private int value = 0, clicked = 0, countdown = 1; private Timer timer = new Timer(1000, null); public OnClickLesson() { timer = new Timer(1000, new countDownTimer()); addMouseListener(new MouseAdapter() …

Member Avatar for Desmond_1
0
257
Member Avatar for Bradoz

Hello below is my code for a program that reads in integers rom keyboard input and creates two polynomials from that input and then does some maths functions on them. I've got the addition working, having trouble with the multiplication though. Any help would be appreciated. thanks import java.util.*; import …

Member Avatar for JamesCherrill
0
3K
Member Avatar for Slavi

Apparently JavaFX is getting really into the game now as far as I see and I think its time I start getting to know it .. Just read a couple of articles and a few questions came up in my mind: - Do I need to use IDE (eclipse) for …

Member Avatar for Doogledude123
0
291
Member Avatar for asaidi

Hi i just export my project on ubuntu and when i run from terminal i have this error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver and in my project the mysql connector is located in the desktop.. any solution please

Member Avatar for Taywin
0
236
Member Avatar for SpottyBlue

I was practising the past year question just now. I wanted the program to show this: > Continent name: Australia > Number of Countries: 1 > Country name: Australia > Population: 22118256 But my code makes the program to show the first 2 lines. package jan2012q5b; import java.util.*; class Continent …

Member Avatar for JamesCherrill
0
163
Member Avatar for SpottyBlue

I was doing the code as part of my lab tutorial. When I tried running the code, it doesn't work. Line 68 has an error. Can help? package t10; import java.util.*; class Employee { private String name; private String title; public void setName(String n) { name = n; } public …

Member Avatar for JamesCherrill
0
152
Member Avatar for nancy10001
Member Avatar for ~s.o.s~
-1
385
Member Avatar for ParPau

I have been looking for a solution to isolate markings and have not found anything on the internet that is close to for what I am looking. I am trying to isolate the markings in a series of pictures. I have one, unmarked image. I then have a series of …

Member Avatar for Taywin
0
564
Member Avatar for salesforce

Hi, My name is Micky. I have requirement, but i don't know how to start it, could anyone help me out. here is the requirement. In a class there are 10 Students with name , marks , Percentage and there rank should be in the below format Name Marks Percentage …

Member Avatar for JamesCherrill
0
303
Member Avatar for astrid.deliz

Hey guys im completely new to programming and im complete stuck and any help to comlete my assingment would be greatly appreciated. heres my assingment. Your task for this assignment is to define multiple classes via inheritance. Your classes should implement various "snacks" including "M&Ms", "Popcorn", etc. To begin, create …

Member Avatar for JamesCherrill
0
1K
Member Avatar for jones13

After trying different things for about a week i have come to the conclusion i am lost. Can someone please show me how to do this. This assignment, based on Vending Machine we did in class, you are to now vend six different snacks. The Vending Machine has a capacity …

Member Avatar for JamesCherrill
0
406
Member Avatar for moaz.amin.37

import java.io.*; class WriteFile { public static void main(String ss[]) { try { FileWriter fw=new FileWriter("output.txt"); PrintWriter pw=new PrintWriter(fw); String s1="Hello World"; String s2="I Am Learning Java"; pw.println(s1); pw.println(s2); pw.flush(); pw.close(); fw.close(); } catch(IOException e) { System.out.println(e); } } } in upper code println() is called with object of `PrintWriter` …

Member Avatar for moaz.amin.37
0
197
Member Avatar for ife_1
Member Avatar for rubberman
0
111

The End.