|
I am having a very long delay with both the presentation of hte JOptionPane.showInputDialogue and when I click on the OK button, I get a 3-6 second delay.
Here is the code:
viewer.setStatus("Waiting on input");
String reason = JOptionPane.showInputDialog("Redaction Reason", "User");
if( reason != null && reason.length() > 0 )
{
viewer.setStatus("Analyzing");
..... do some analysis
}
Now, the status shows in the parent "viewer" and then a long wait ( sometimes )
until the option pane appears. Then a long wait while the components are painted, wait for the input field, wait for the OK button, and the Cancel button.
Enter input, then click OK. VERY LONG WAIT ( 3-6 seconds ) before panel hides and next statement is executed. No indication of problem. CPU useage very low.
Nothing else running to eat up cpu ( highest < 10% )
This seems to have appeared recently. Don't know if it was the upgrade in Java for Snow Leopard, or something I've done in the code, but I don't see why anything I've done that isn't eating up time would affect the time to appear or time to dissappear significantly.
Running on Mac OS X Snow Leopard 10.6.3
|
|
|
|
|
In addition, all mouse events seem to be extremely slow with long delays in dragging, clicking, etc. It isn't the time for my code to process the event, it appears to be a delay before my code gets the event.
|
|
|
|
|
Just measured 20 seconds to display the OK button after the frame of the option panel had appeared. CPU this time was at 60% after starting the show of the pane until the OK button appeared.
|
|
|
|
|
How do i concatenate this 2 lines of code:
dtProgramada.getValue()
dthoraProgramada.getValue()
And later add them as parameters on this method of type Date:
aux.setDataProgramada();
dtProgramada it's a Datebox and dthoraProgramada it's a Time box (ZK framework),
public Date getDataProgramada() {
return dataProgramada;
}
public void setDataProgramada(Date dataProgramada) {
this.dataProgramada = dataProgramada;
}
Please advise...
|
|
|
|
|
I don't know ZK, so I am making some assumptions here, there may be an easier way built into ZK.
Assuming that you want to take a Date (from the Datebox) and set its time part (from the Time box) and get a Date back as a result, you should use java.util.Calendar. Exactly how you do that depends on what the ZK components return from getValue().
|
|
|
|
|
hi
i have to make a program in which it will provide me a messenger which can connect to the internet and enter that facebook library.
it must be able to get my buddy's list from my facebook account and most espacially it must send and receive messages to and from my buddies.
|
|
|
|
|
Sin number two.
Please don't start another thread to continue a previous item. It's rude and the hamsters don't like it.
Now to repeat: We are not going to do your homework for you.
Is there something you do not understand?
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Stop it. If you've waited this long to start your project, you're never going to finish it in it. Noone is going to do your work for you. Scine you've demonstrated that you can't manage your time properly, yuo'll get the grade you deserve and fail to pass the class. Oh, and by the way, your future employers will be looking for that "time management" skill.
Face it - you've screwed yourself. Now go have a cigarette.
|
|
|
|
|
Hi Guys,
I need to format an input field to accept only time with this format: "H:mm:s"
How can this be done?
|
|
|
|
|
This could be quite an intersting side project, but I think the easiest thing would be a quick google for swing time controls. There are plenty of choices here[^], I wouldn't write your own.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
You can assign a KeyListener to the JTextField and perform a quick validation check after a key is typed. Here[^] is a good example of applying the KeyListener .
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
If allowed it's simpler to plug in a control to do the job for you.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
True, but I haven't come across any controls that format the date like he wants and perform a validation to check it is a valid date. Then again, I haven't looked.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
fly904 wrote: I haven't looked
I surface skimmed what's on the Sun site.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
I think JDatePicker supports this format, it certainly has an example in the screenshot on the home page. I'm not sure what it does with the value you enter, though, because Java does not have a Time type.
Alternatively, I suppose you could build your own with JFormattedTextField and an InputVerifier or the JGoodies Validation framework.
|
|
|
|
|
hi,
good evening?
can anone help me in my project which is actually due tomorrow
|
|
|
|
|
I don't think anyone can, or will, help you!
Look at what you've just written:
Sedruol2k9 wrote: hi,
good evening?
can anone help me in my project which is actually due tomorrow
tell me, WHY I should help when you don't tell us anything about what you are doing?
0. If there's a bug you can't fix, post a code snippet and we'll see what we see.
1. If you 'want code' then please go away. Quickly.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Sedruol2k9 wrote: my project which is actually due tomorrow
Well then, I must call you a procrastinator and tell you that you're pretty much screwed.
|
|
|
|
|
So, how was presenting your project today? Fun?
|
|
|
|
|
yes, was able to make my own program, thanks for the big help, ahhh!
|
|
|
|
|
hello,
i have a nokia N70 mobile phone which is a 2nd edition S60 Symbian OS based phone. i want to develop java application for it.
So, i downloaded netbeans IDE (full version, 310mb) and latest java jdk with ME. but i dont know from where i should start because i dont find any option for S60 or N70 in netbeans. i have knowledge of core java only, not advance java.
please help
|
|
|
|
|
|
netbeans can not work specilly for mobiles it can work on projects u can make mobile applecation for any mobile which is java enabled.. u make jar file for mobiles. but if u have good prectice of netbeans hoe to work it. and good knowledge of java, core java is not suficient for that type of application.
|
|
|
|
|
I'm sorry, but your answer is rather flawed. Java ME is structured rather differnetly to SE and above.
As well as the runtime, J2ME[^] requires hardware specific configurations, the CLDC being the appropriate one here.
I am no expert, but programming for J2ME is not too far from SE/EE except that the program flow is rather different as you need to handle interupts and state changes. Funnily enough, the standard implimentation provides all the hooks you need.
Netbeans DOES provide a lot for J2ME, including a generic device emmulator.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
hi. i have this really big table with some millions of records every day and in the end of every day i am extracting all the records of the previous day. i am doing this like
<br />
String SQL = <br />
"select col1, col2, coln <br />
from mytable <br />
where timecol = yesterday";<br />
<br />
Statement.executeQuery(SQL);<br />
but the problem is that this program takes like 2GB of memory because it takes all the results in memory then it processes it.
i tried setting the Statement.setFetchSize(10) but it takes exactly the same memory from OS it does not make any difference. i'm using "Microsoft SQL Server 2005 JDBC Driver" for this.
i there any way to read the results in small chunks like oracle does when the query is executed it show only a few rows and as you scroll down more results are shown?
|
|
|
|