35,618 Topics

Member Avatar for
Member Avatar for Leo_5

I am a beginner to hibernate.... I have a two tables like, t_2013 id name 1 donald t_2014 id name 2 charles This is my jpa, @Entity @Table(name="t_2013") public class Test implements Serializable { @Id @GeneratedValue @Column(name="id") private int id; @Column(name="name") private String name; Here i create one jpa with …

Member Avatar for cool_zephyr
0
192
Member Avatar for SreeJo

hi , we have a requirement to get grand parent,parent and child nodes display in treemodel.At the moment we have the parent ,child display of Tree Model .Could you please advise what need to be done to get this hierarchy -Grand Parent - Parent -children Thanks in advance for your …

Member Avatar for mKorbel
0
158
Member Avatar for Ghost

Hi, Is it possible to create a Java compiler? Could you make a Notepad-like application, save the code as a .java file, compile it into a .class file, and run it? Basically, I want to combine Notepad and Command Prompt. I just need help on the compiling part (and listing …

Member Avatar for stultuske
0
865
Member Avatar for mussdroid

Hi Guys , I know this looks like quite funny question during the holiday season , but i developed small netbeans application called helloworld , which is kind of pressing button and displaying helloworld , i pressbuild the application and press run , but my application is not runnig even …

Member Avatar for mussdroid
0
203
Member Avatar for sarthak25
Member Avatar for mussdroid
Member Avatar for mussdroid
0
237
Member Avatar for mussdroid

Hello Guys , When I checkout code from svn i get this error message any idea to fix this issue ? I use netbeans 7.3.1 , plugin subversion. ![38e5e181fb4f014e1a9cac948390b20a](/attachments/small/4/38e5e181fb4f014e1a9cac948390b20a.PNG "align-left")

Member Avatar for JamesCherrill
0
260
Member Avatar for 2384443

I have just started to learn java..!! I'm trying to implement some C++ programs in java.. Some of them are working perfectely. But this is the only program which is not working.. It's showing 2 errors at br.readLine().. I don't know what to do.. Kindly please have a look on …

Member Avatar for JamesCherrill
0
212
Member Avatar for karthick_pmk

i am try to compare the Stored-password and Salted Password for the Experiment. Now i have a Stored Password and Salted-password., Stored-password having 72-byte and Salted-password having 18-bytes only, but i facing problem on comparison, how can i compare the both of them.. Here my Code : RandomAccessFile raf = …

Member Avatar for Ewald Horn
0
249
Member Avatar for djdanjo82

Hello all! Again thanks for viewing my thread. The past couple of days I have been struggling with trying to add JPanels to a JScrollPane. Basically I have data to display that comes in from another application in the form of a JPanel with regular updates. I am trying to …

Member Avatar for ramesh midatana
0
2K
Member Avatar for poojakakde000

code in java for send a free msg from internet to mobile phone like way2sms or 160by2 sites................. what are the requirments for that???? pls reply as fast as possible...........

Member Avatar for stultuske
0
131
Member Avatar for bCubed

I downloaded eclipse to my windows 8 computer along with the jdk and when I launch eclipse it tells me that it cannot not find the jre or jdk and that it is not in my current PATH. I have tried setting the path to the jdk folder but it …

Member Avatar for bCubed
0
339
Member Avatar for Benjamin_4

Hello guys i want to show a data in my combobox when i click on an item ion my jtable i tried this but it doesn't work. i would apprecite it if any one can help thanx String add5 = rs.getString("Id_branch"); branch_combo.setSelectedItem(add5); String add6 = rs.getString("User_Role"); UserRole_combo.setSelectedItem(add6);

Member Avatar for JamesCherrill
0
135
Member Avatar for <M/>

I am trying to write a program to calculate mean & standard deviation. I sort of figured out how to find mean (it is not correct yet, so i am going to need help on this part as well) but how do you do standard deviation? import java.util.Scanner; public class …

Member Avatar for dev90
0
501
Member Avatar for <M/>

This is a code that I wrote and for some odd reason it doesn't count the number of inputted integers properly. import java.util.Scanner; public class IntegerCount { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter an integer, the input ends if it is 0: "); int …

Member Avatar for dev90
0
322
Member Avatar for rohan21blade

**HEre is my checkout.java** index LCval = new index(); final String LCnum = LCval.getVal(); JButton btnNewButton_1 = new JButton("Finish"); btnNewButton_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try{ int bal = 0; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); String connectionURL = "jdbc:sqlserver://ROHAN\\SQLEXPRESS;Database=sys;user=rohan;password=rurouni;"; Connection con = DriverManager.getConnection(connectionURL); PreparedStatement pst =null; ResultSet rs = null; //Statement st=con.createStatement(); …

Member Avatar for JamesCherrill
0
295
Member Avatar for <M/>

Is this correct? I wrote a decimal format and it doesn't work. how do i correct this: return sum / myFormatter.format(Math.sqrt(x.length - 1)); I will submit the full code if needed.

Member Avatar for dev90
0
164
Member Avatar for nay.htet.1481

I learn Java programming language. I have a .exe file that was produced with lunch4j. I can easily run that application in my computer but I can't run it in other computer. I got error ""Window can't access the specified device, path or file, you have the may not have …

Member Avatar for stultuske
0
231
Member Avatar for JRDJ12

My requirements are as follows: 1. use main method 2. use the following array- `int[] grades = new int[] {` `82, 70, 99, 90, 92, 75, 87, 85, 91, 100, 91, 87 ` `};` 3. Write code to step through the array of grades and calculate the average grade. Modify …

Member Avatar for JamesCherrill
0
10K
Member Avatar for Graphix

Hey everybody, Lately I have written the game Hangman in many different languages (C, JavaScript, Java and PHP so far). Here is the code snippet for Java! It uses a words file, on the bottom of this post you will see a small example of a few words. The source …

Member Avatar for JamesCherrill
2
4K
Member Avatar for <M/>

I am trying to do an assignment that requires us to do something with pentagonal numbers. This is my code: import java.util.Scanner; public class Pentagonal { public static void main(String[] args) { System.out.print("The Pentagonal Numbers: "); getPentagonalNumber(10); } public static int getPentagonalNumber(int n) { Scanner input = new Scanner(System.in); System.out.print( …

Member Avatar for <M/>
0
1K
Member Avatar for <M/>

I am trying to reverse the number that is doubled from the user input. Problem is that if they enter a number like 20000 it gets doubled into 40000 but it reverses it to 2 rather than 4. How do i get it to make the doubled number reversed and …

Member Avatar for <M/>
0
250
Member Avatar for <M/>

Okay, so for another assignment I have to find the distance of two points. I understand how that works but for some odd reason, when the program the professor set up tests it, the numbers are way off. This is what i have done: public class Distance { public static …

Member Avatar for <M/>
0
225
Member Avatar for sciwizeh

I made this minesweeper game earlier this summer. It shows many things, including: array use, 1D array to 2D array, gridlayout, changing the way a JButton works depending on mouse button used, floodfill, loops, GUI. slightly long, 382 lines, can probably be condensed. There is one known bug that i …

Member Avatar for sciwizeh
2
855
Member Avatar for <M/>

This is how you calculate the area of a triangle, hope you guys find this useful. import java.text.DecimalFormat; import java.util.Scanner; public class Exercise2_15 { // find the area of a triangle public static void main (String [] args) { double side1 = 0; double side2 = 0; double side3 = …

Member Avatar for JamesCherrill
0
207
Member Avatar for S.M. Murad Hasan

I have a problem with my newly application where i want to execute a c/java program file. And after executing the file i want to work with the output of that file. Please anybody give me the solution for that how can i do this?

Member Avatar for lolafuertes
0
403
Member Avatar for <M/>

Hi guys, i am trying to find the area of a triangle and for some odd reason i can't get it to produce the right numbers. Here is my code: import java.util.Scanner; public class Exercise2_15 { // find the area of a triangle public static void main (String [] args) …

Member Avatar for <M/>
0
470
Member Avatar for joelanandraj

in my program a simple shopping application for my lab exercise, i just calculated the price of items inside a for loop but when i try to print it outside it is not getting printed...pls give me some suggestion. for (int i = 1; i < 7; i++) { String …

Member Avatar for stultuske
0
365
Member Avatar for Tapan1

[CODE] try { Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "tiger"); if (con == null) System.out.println("Connection not successful"); else System.out.print("successful...."); con.close(); } catch (Exception e) { e.printStackTrace(); } [/CODE] Error: [CODE] java.sql.SQLException: The Network Adapter could not establish the connection at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412) at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531) at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503) at …

Member Avatar for stultuske
0
984
Member Avatar for kavitha_1

Hi, I need to create a Add-on for firefox I have tried the following methods and it is working fine 1. Using XUL runner 2. Drag and Dropping the .XPI file in the Mozilla Firefox.(using XUL, HTML,CSS and Javascript). Can anyone tell me How to create an Add-on for Firefox …

Member Avatar for james6754
0
73

The End.