Displays the time in a GUI using NGP
how can I add a text box to a GUI that displays the current time?
similar to what is displayed on a windows Start Bar
I am new to java, creating my first GUI using the NGP version of the swing package
EWWW :.... Formatted this time.. =)
Oh, to answer the question:
import javax.swing.Timer;
import javax.swing.JLabel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Calendar;
import java.text.DateFormat;
* Time display label with auto update.
* @author Derisor
public class TimeLabel extends JLabel implements ActionListener {
private Timer myTimer;
private Calendar cal = Calendar.getInstance();
private DateFormat df = DateFormat.getTimeInstance(DateFormat.LONG);
public TimeLabel () {
myTimer = new Timer(1000. this);
myTimer.start();
public voidActionPerformed(ActionEvent e) {
if (e.getSource() == myTimer)
this.setText(df.format(cal.getTime()));
}
Similar Messages
-
Hi,
in Lion I was able to display the time passively in the top bar. Now I only have the chance to display the percentage. Anyone has a solution for this? I do not want to click always on my battery button just to see something I used to see in the past at a more prominent place.
Actually this bug really ticks me off!
Thanks for any advise.http://www.apple.com/feedback/macosx.html
Send feedback to apple about changing this back.
There is no native way to do this. -
How to display the time in Swing jtable
I need to display the time in jTable.
The time is a date field in ORACLE database (connected via
Oracle Thin drivers).
Im totally stuck. Please help.
TIA.Thanks for your reply.
My problem is that I have to display time. This time is a DATE field
in ORACLE database.
Im using FORTE (UI). What the jTable display is the DATE (1900-01-01) which is not what I want. I want the time to appear in the jTable (hh.mm.ss a).
What I did was to use the TO_CHAR function of ORACLE to format the
date to display the correct time in the VIEW before mapping this view
to be used as a MODEL by the jTable.
It works now.
Much appreciate all your help. Thanks. -
How to display the time length of video (current time/ total time) ?
Hi,everyone. I would like to ask how to display the time length of the video which show only in system example: it show the current time and total time? using AS 3.0.
It there any information or solution to solve it? .
I appreciate it any of you able to answer it. ^^
Thank you.Hi,
Actually I have this requirement for MAC OS 10.5. With the code you provided, I got the output as "6289375". When I changed the URL to point to my file (file:///Users/VPKVL/Desktop/MyRecord/tempAudio.wav), I am getting the below mentioned Exception:
Exception in thread "main" javax.sound.sampled.LineUnavailableException: Failed to allocate clip data: Requested buffer too large.
at com.sun.media.sound.MixerClip.implOpen(MixerClip.java:561)
at com.sun.media.sound.MixerClip.open(MixerClip.java:165)
at com.sun.media.sound.MixerClip.open(MixerClip.java:256)
at TestWavLength.main(TestWavLength.java:13)The "tempAudio.wav" file is created by using java sound API. I am using the SSB USB Headphone Set to record the audio with the following settings for AudioFormat object:
AudioFormat audioFormat = new AudioFormat(
AudioFormat.Encoding.PCM_SIGNED, // the audio encoding
// technique
48000.0F,// sampleRate the number of samples per second
16, // sampleSizeInBits the number of bits in each sample
2, // channels the number of channels (1 for mono, 2 for
// stereo, and so on)
4, // frameSize the number of bytes in each frame
48000.0F,// frameRate the number of frames per second
false); // bigEndian indicates whether the data for a single
// sample is stored in big-endian byte order
// (false means little-endian)Can you please suggest where I am going wrong ? -
Photoshop CS6 crashes all the time and especially when using the type tool... please help!
Since I did not have this problem with CS5 or CS4, I can only assume something is not right with Photoshop CS6... below is my video card info:
ATI Radeon HD 4850:
Chipset Model: ATI Radeon HD 4850
Type: GPU
Bus: PCIe
PCIe Lane Width: x16
VRAM (Total): 512 MB
Vendor: ATI (0x1002)
Device ID: 0x944a
Revision ID: 0x0000
ROM Revision: 113-B9110C-425
EFI Driver Version: 01.00.383
Displays:
iMac:
Resolution: 2560 x 1440
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Built-In: Yes
Connection Type: DisplayPort
Cinema HD:
Resolution: 1920 x 1200
Pixel Depth: 32-Bit Color (ARGB8888)
Display Serial Number: 2A80273WXMN
Mirror: Off
Online: Yes
Rotation: Supported -
I am having a difficult time getting the duration of multiple selected clips. The duration display will only display the time for one clip not multiple clips. Yes, I know I can add them up myself, but why? :-)
I am using imovie 10.0.6For reasons that you would have to ask Apple for they decided not to allow the precise position of the playhead to be shown in iMovie 10 (unlike in FCP 10.1.x).
Geoff -
Display the 3rd hieghest value without using rowid
HI All,
Can any one help me how to display the 3rd hieghest valuer without using a ROWID..
Thanks
BasavaFrank, using ROWNUM = 1 instead of DISTINCT could be a bit faster:
SQL> SET LINESIZE 132
SQL> EXPLAIN PLAN FOR
2 WITH got_r_num AS (
3 SELECT DISTINCT sal,
4 DENSE_RANK() OVER(ORDER BY sal DESC NULLS LAST) AS r_num
5 FROM scott.emp
6 )
7 SELECT sal
8 FROM got_r_num
9 WHERE r_num = 3
10 /
Explained.
SQL> @?\RDBMS\ADMIN\UTLXPLS
PLAN_TABLE_OUTPUT
Plan hash value: 436395657
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 9 | 234 | 5 (40)| 00:00:01 |
|* 1 | VIEW | | 9 | 234 | 5 (40)| 00:00:01 |
| 2 | HASH UNIQUE | | 9 | 36 | 5 (40)| 00:00:01 |
|* 3 | WINDOW SORT PUSHED RANK| | 9 | 36 | 5 (40)| 00:00:01 |
| 4 | TABLE ACCESS FULL | EMP | 14 | 56 | 3 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
1 - filter("R_NUM"=3)
3 - filter(DENSE_RANK() OVER ( ORDER BY INTERNAL_FUNCTION("SAL") DESC
NULLS LAST)<=3)
18 rows selected.
SQL> EXPLAIN PLAN FOR
2 WITH got_r_num AS (
3 SELECT sal,
4 DENSE_RANK() OVER(ORDER BY sal DESC NULLS LAST) AS r_num
5 FROM scott.emp
6 )
7 SELECT sal
8 FROM got_r_num
9 WHERE r_num = 3
10 AND ROWNUM = 1
11 /
Explained.
SQL> @?\RDBMS\ADMIN\UTLXPLS
PLAN_TABLE_OUTPUT
Plan hash value: 21859616
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 26 | 4 (25)| 00:00:01 |
|* 1 | COUNT STOPKEY | | | | | |
|* 2 | VIEW | | 14 | 364 | 4 (25)| 00:00:01 |
|* 3 | WINDOW SORT PUSHED RANK| | 14 | 56 | 4 (25)| 00:00:01 |
| 4 | TABLE ACCESS FULL | EMP | 14 | 56 | 3 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
1 - filter(ROWNUM=1)
2 - filter("R_NUM"=3)
3 - filter(DENSE_RANK() OVER ( ORDER BY INTERNAL_FUNCTION("SAL") DESC
NULLS LAST)<=3)
19 rows selected.
SQL> SY. -
How do I connect to Time Capsule from a Windows 8.1 machine which is on a Windows domain. I have been able to connect from a Windows 7 machine on a Windows domain to a Time Capsule. Airport utility is not displaying the Time Capsule Win8.1 machine.
I have checked that the firmware has been updated to 7.6.4 . Similalrly the Win8.1 machine has been loaded with the update specified in another discussion.Firstly how are you connecting to the TC.. wireless or ethernet?
Please open a command window and ping it.. ping by name and by IP address.
If ping succeeds at least by IP it should work.
In windows explorer type
\\10.0.1.1 (or whatever the TC ip is.. that is the default).
Having the airport utility for windows loaded can help the process. As it loads bonjour for windows.
7.6.4 firmware on the TC is useless. It works better on 7.6.1
If the ping does not succeed by either name or IP address yet you have internet through the TC, then your network is setup wrongly. You are have firewalls blocking local IP. Take down all the firewalls. -
How to display the output screen when I use bdc.
hey expert,
I want to display the output screen when i use bdc without using mode 'A'.
thank you.Hi,
You can go for mode 'E'.. it will display the output screen directly and if there is any error in the transaction you would get that particular screen and you can correct and continue after which you will get the final screen if anything goes fine...
check this sample code....
I had a program if you execute below program it automatically creates a new zprogram.
REPORT zprogram_create_recording.
PARAMETER:
p_prog TYPE sy-repid OBLIGATORY,
p_shtxt TYPE repti OBLIGATORY,
p_pack TYPE devclass DEFAULT '$tmp'.
DATA:
t_bdcdata LIKE
STANDARD TABLE
OF bdcdata.
DATA:
wa_bdcdata LIKE LINE OF t_bdcdata.
REFRESH t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLWBABAP'.
wa_bdcdata-dynpro = '0100'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'RS38M-PROGRAMM'.
wa_bdcdata-fval = p_prog.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'NEW'.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLSEDTATTR'.
wa_bdcdata-dynpro = '0200'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'RS38M-REPTI'.
wa_bdcdata-fval = p_shtxt.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'TRDIR-SUBC'.
wa_bdcdata-fval = '1'.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'CONT'.
APPEND wa_bdcdata TO t_bdcdata.
IF p_pack EQ '$TMP'.
*local object
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLSTRD'.
wa_bdcdata-dynpro = '0100'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'KO007-L_DEVCLASS'.
wa_bdcdata-fval = ' '.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'TEMP'.
APPEND wa_bdcdata TO t_bdcdata.
ELSE.
*package assignment with request
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLSTRD'.
wa_bdcdata-dynpro = '0100'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'KO007-L_DEVCLASS'.
wa_bdcdata-fval = p_pack.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'ADD'.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-program = 'SAPLSTRD'.
wa_bdcdata-dynpro = '0300'.
wa_bdcdata-dynbegin = 'X'.
wa_bdcdata-fnam = 'KO008-TRKORR'.
wa_bdcdata-fval = ' '.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'KO008-AS4TEXT'.
wa_bdcdata-fval = ' '.
APPEND wa_bdcdata TO t_bdcdata.
CLEAR wa_bdcdata.
wa_bdcdata-fnam = 'BDC_OKCODE'.
wa_bdcdata-fval = 'LOCK'.
APPEND wa_bdcdata TO t_bdcdata.
ENDIF. " IF P_PACK EQ '$TMP'
CALL TRANSACTION 'SE38' USING t_bdcdata MODE 'E'.
Hope this would help you..
Regards
Narin Nandivada -
How to display the output of report(9i) using Report Background Engine
Hi,
We are converting the forms and reports from 6i to 9i.
we could run the report in the browser from form using WEB.SHOW_DOCUMENT built-in, but we are not able to display the report output from form using the Report Background Engine.Let us know if you have any solution for this.
Regards,
Pramila.Pramila,
you have to use Reports Server called from RUN_REPORT_OBJECT(). Please see the Reports Integration whitepaper on otn.oracle.com/products/forms. You can either look it up in the Forms 10g collateral seciton or the Forms 9i collateral section.
Frank -
How to display the time 00:00:00 as blank?
Dear Friends,
I have created a new field GDF_9000_CREATED_AT in the normal screen (dynpro), the format is TIMS, however, when there is no value for it, is always display like "00:00:00" on the screen.
So how to display the time 00:00:00 as blank in the normal screen (dynpro) when there is no value for it?
Thanks a lot!!In screen PBO module:
LOOP AT SCREEN.
if screen-name EQ 'my_time' AND my_time EQ time_zero.
screen-invisible = 'X'.
screen-active = 0.
MODIFY SCREEN.
endif.
ENDLOOP.
I don't try this, but i think is true...
Edited by: Marco Modenese on May 7, 2009 10:36 AM
Edited by: Marco Modenese on May 7, 2009 10:36 AM -
How to display the time & battery % in home screen
How to display the time & battery % in home screen
Try resetting your device.
Hold down the Home and Sleep/Power Buttons until the Apple Logo shows up.
Ignore the red slider if it appears.
This will reboot the phone, no data should be lost. -
I am trying to get iMovie 09 to display the time ON THE VIDEO while it is playing. How do I do that? I know there is that one thing to display hours and minutes, but thats not good enough, I need the seconds and even milliseconds if possible. Is there any way to do this in iMovie? I need to do it for work. Also, if that's not possible, there has to be some program out there that will do. If there is, any recommendations?
ThanksI think I found the perfect program, it's called Toki TC. It's $20 but seems to do exactly what I'm looking for so if there's anybody else that needs to do what I'm doing, look up Toki TC. If anybody knows of a better or cheaper program, please post =)
-
Display the workitem in Web GUI Homepage
Hi Experts,
How can I display the workitem in Web GUI Homepage?
I created a workflow and it is sending a workitem but I can' see the workitem sent to my Web GUI homepage.
Thanks in advance,
james
Moderator message: please have a look in the dedicated Workflow forum.
Edited by: Thomas Zloch on Jan 20, 2011 3:55 PMHi James,
First of all, i would like to know whether you can see the workitem in SAP Business workplace (GUI) ?
If yes, then you would find one of my article which would make an interesting reading and would help you in your query.
[SAP Business Workplace Vs SAP CRM WebUI Worklist|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0c2ff2f-d6ef-2d10-5885-d989e034feac]
Regards,
Anand -
Can the time capsule 2TB be used as more memory
Can the time capsule 2TB be used as more memory or is it just for backing suff up?
Can you wirelss transfer video and music to your iPhone or iPad without using the computer?You can use Time Capsule as a 'simple' external harddisk, but keep in mind that the fastest connection with the TC is Ethernet which is slower than FireWire800 for example.
Currently iTunes and a USB-connection is needed for syncing an iPad or iPhone.
With the "PC Free" feature of the yet to be released iOS 5 (this fall...) this might not be needed anymore.
Stefan
Maybe you are looking for
-
How do I update grouping or description for multiple items?
As the question implies, I would like to update information in the Grouping and Description fields for multiple items as a way to keep things organized. What I have discovered is that there are some quirks in the new Get Info window that were not in
-
Best way to play movies from MacBook Pro to HDTV
I have some hi-res 1080p movies on my MacBook Pro which currently runs Lion 10.7.4. Planning on upgrading to Mountain Lion but my hardware will not support Airplay Mirorring (it's a mid 2009). I will soon be buying an iPad 3rd generation also which
-
When I bump into my desk, even slightly, the Mac Pro shuts down and tries to restart, but although the tower "on" light remains on, it doesn't actually restart and the screen remains black. I then have to manually shut down and then power back on. I
-
Photoshop CS6 (mac release version) is FREAKING OUT on external screen
Is it just me having this problem? When I use Photoshop CS6 (released version) on my brand new MBP17 everything is just fine. Then I pull it to my connected Cinema Display and everything FREAKS OUT. Every pixel inside the imagewindow is distorted, is
-
Quicktime MPEG2 Codec Softward
Just downlaoded Quicktime MPEG2 software which would help convert my .mod files to a usable format in imovie. Paid my S$35 (about US$25) but whehn it was downloafing I got a message saying my Mac OS was too modern for this software! How can the Apple