sandeep kumar jangra

Greenhorn
+ Follow
since Jan 12, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by sandeep kumar jangra

just make a class where u look up and call EJB methods.. this class is called from Action class from where u get the result. this result can be shown in jsp as u do wiyth simple struts application..... where's the problem
19 years ago
hello frenz... i want to make a swing GUI that looks like general editors like Eclipse where we have certain frames and any frame can be maximised closed etc... I have made that but the problem is I want that suppose I have three JInternalFrames viz left, center and bottom like left will contain a JTree, Center will contain my other GUI and bottom will contain other frames... now what I want is when i close a particular frame other two JinternalFrames should occupy its space and when its again invokedit should get back its position and the other two should move to their original size...
You can have a look at eclipse to get a view of what i want to make... is it made in Java Swings or something else... please help

thanx in advance
19 years ago
Thanx Rob Spoor and Jayesh Lalwani........

I worked around some trick
19 years ago
hello frenz... I have a problem regarding JNI.. i dont know C++ but i hv to implement JNI. actually i have got a driver program written in C++ for reading RFID cards. it have a method for reading the card. i.e
which takes parameter of type structure

typedef struct _RfidInfo {
unsigned int id;
unsigned int padding;
charname[64];
charivst[32];
chardummy[8];
}RfidInfo;

but since i cant use structures in java. how shud i call this native method from java. I have to set the values if i take any java object and how shud i give unsigned int..

plz help
19 years ago
hi frenz.. i m making an application in which I m calling servlets from Swing applications. these servlets are talking to database and performing some operations. so far fine.
these opeartions are time consuming.. so I thought of using SwingUtilities. invokelater(). but I want to get return values from these operations which will be taking place in runnable objects run method. compiler is saying these values should be final. but i want to use these values in other parts of the programs.
i.e. after servlet is done with its work.. it returns a value... I want to work with that value...plz help if anybody have any idea. plz make sure reply is easy to understand coz i m not perfect.
thanx
19 years ago
hello frenz... I dont know if this question is to be asked in this group or not if not then plz forgive.. Actually i hv made and application in which I m supposed to start some device and then store the Start date and timein MySQL and then retrieve that date and time and show in GUI...
in java side I m using java.util.Date and in MYSQL table I m using simple Date(I guess that is java.sql.Date)

Now problem is I m getting the Date from GUI and converting it into java.sql.Date and then inserting. but it is storing only 0000-00-00. I dont know whats going wrong. i tried forums but none is clear enough. plz help me out

I want to show time also. I dont want to change either so plz give any round about.

code to enter java date in mysql is:


java.util.Date startTime = obj.getOperationTime();
java.sql.Date time=new java.sql.Date(startTime.getTime());

String updatdev = "update DeviceApplication set DeviceApplicationStatus ="
+ status + ", DeviceApplicationStartTime =" + new java.sql.Date(startTime.getTime())+ " where DeviceApplicationID =" + deviceID;
//Execute the Query
int i = stmt.executeUpdate(updatdev);



plz help
thanx
19 years ago
thanx everybody for making me learn the way to post topic. plz bear with newbies

hi frenz... i have a problem regarding JTree and JToolBar...
what i m doing is..

when my application starts i m making a GUI which contains a panel which shows
1) JTree
2) JMenu
3) JToolBar.

JTree is constructed from nodes which is constructed from fields from database.. thus the nodes(objects) are created when applications starts.
(by connecting to database).

In the JToolBar and JMenuBar, I m using actions to which I m sending this JTree as parameter. these actions are using this JTree to perform Operations. these operations include adding Nodes to JTree. I m able to do that..i.e. adding nodes to JTree model and Database and the node is successfully added in JTree view but the problem is after adding or deleting the nodes when I check for the parents , they contain same elements as when the application started..


when I restart the application all the data is again fetched from database and JTree is constructed. The problem is obvious that i passed the JTree, which i constructed when the application started, as argument and it is still working on that parameter.. what i want is that whenever any change occurs in JTree i.e adding or deleting , changes should be applicable from that very moment.. I m troubled by this.. plz help with detailed and clear example.
thanx in advance
Sandeep
19 years ago
hi frenz ... my problem is I m making an application in which there are many JInternalFrames. I want to maximise or minimise them from Menu. code I m using is

if(!(frame.isMaximizable())){
frame.getDesktopPane().getDesktopManager().minimizeFrame(frame);
frame.setMaximizable(true);
JInternalFrame[] frames=desktop.getAllFrames();
for(int i=0;i<frames.length;i++)
frames[i].setLayer(i);
frame.setLayer(32767);
}
else{

frame.getDesktopPane().getDesktopManager().maximizeFrame(frame);
frame.setMaximizable(false);

}




but problem is that neither window does not maximise properly. it comes over another window.partially maximised partially below other frames. what could be the problem. plz answer. thanx in advance
19 years ago
sorry gregg... i too want people to answer my question when they have time.
but atleast i can request... that was a request...anyhow I wont be using dat word. but plz go through my problem and answer
thanx
19 years ago
hi frenz... i have a problem regarding JTree and JToolBar... what i m doing is..when my application starts i m making a GUI which contains a panel which shows a JTree and JMenu and JToolBar. JTree is constructed from nodes which is constructed from fields from database.. thus the nodes(objects) are created when applications starts. in the JToolBar and JMenuBar, I m using actions to which I m sending this JTree as parameter. these actions are using this JTree to perform Operations. these operations include adding Nodes to JTree. I m able to do that..i.e. adding nodes to JTree model and Database and the node is successfully added in JTree but the problem is after adding or deleting the nodes when I check for the parents , they contain same elements as when the application started.. when I restart the application all the data is again fetched from database and JTree is constructed. The problem is obvious that i passed the JTree, which i constructed when the application started, as argument and it is still working on that.. what i want is that whenever any change occurs in JTree i.e adding or deleting , changes should be applicable from that very moment.. I m troubled by this.. plz help with detailed and clear example.
thanx in advance
Sandeep
[ September 16, 2005: Message edited by: Michael Ernest ]
19 years ago
hi frenz... i have got a problem with JToolBar.. actually i have added some Actions with JToolBar n the Images I have used are of 24 X 24 pixels. when i m working on 15 inch monitor. everything works fine but when i use a 17 inch monitor buttons get bigger and the shape of buttons become rectangle unlike 15 inch monitor. i havent used any other option with JToolBar so their is no issue of insets or anything else. i dont know whats going wrong coz the buttons cover almost half the screen which is looking bad. plz help. thanx in advance

regards
19 years ago
hi frenz ... i want to make a splash Screen that get disposed after main program screen shows up... but i m not sure of the time that will be taken by the main program... secondly if there is any problem in the main program than it should be intimated to the user...plz help

Sandeep Kumar
19 years ago
Thanx alot Craig Wood.. it worked for me... dats why i like javaranch
bye
19 years ago
Hi frenz... I have a problem with JToolBar n JMenu.. I want to create JMenu n JToolBar with some Actions. I have created those Action classes but what i want to do is associate small image with JMenu n large image with JToolbar. but problem is i can give path for single image while creating specific Action class.
plz help urgent
19 years ago
hi All... I want to make a table in which data will be added on runtime. what actually will be done is that I will select a node from a JTree and on clicking a button I want that this object is placed in JTable provided and also there should be a JComboBox in one column which can be edited to furthur add the data and on clicking another button I want all this information.
I have tried cell editor and cell renderers with no success and it is very urgent ..

can anybody help me out

Thanks in advance
19 years ago