How to get last visited directory in JFileChooser?
Hi,
I m using a swing application.
I just want to know if i select any fuile in JFileChooser once then if i again go to select file then it must open the last visited directory.
Can anybody tell me how to do that?
Thanks
Dheeraj
You just save the result of the last JFileChooser, and feed it into the next instance of the JFileChooser... or just reuse the first instance again and again....
JFileChooser jfc1 = new JFileChooser ( new File(".") );
File selectedFile = jfc1.getSelectedFile();
JFileChooser jfc2 = new JFileChooser ( selectedFile );regards,
Owen
Similar Messages
-
how can I get last visited pages on 08/06/12. I can't see it in my history. Is there any archives with please give that history. (only need amazon.co.uk)
hello the history is the only place where firefox stores the visited pages. change your settings in firefox > options > privacy when you want to keep the visited sites in the future & make sure that no external programs (like security or "tune-up" software) is clearing the history either. when firefox is launched in private borwsing mode, it won't keep history information for this session.
[[Settings for privacy, browsing history and do-not-track]] -
How to get last Build date of a dll in the real time target
Info On My Project
I am working on LabWindows CVI 12.0 for development . This project is a real time application for hardware, which is having Phar Lap ETS as RTOS...
I am facing some problems while checking Build date of my Application file( .dll)
I have tried to use GetFileDate API. But it is not supporting for realtime Target..
So i have tried __DATE__ macro.. That also having some problems..
How to get last Build date of a dll from the real time target ??
Please Help to solve this....
Thanks
Vaishakh A KPlease reply if any one have suggestion...
-
How to Get last page number in report 10g
I want to get last page number in report but Current page number found from srw.get_page_num(n)
but i want to get last page number for conditional formating like this
srw.get_page_num(current_page)=last_page
pls help me how can get last page number;
pls help;
thanks in advanced;Hi,
you can use the Property Print Object On for this.
Regards
Rainer -
How to get last column used in report sorting?
hi,
how to get last column used in report sorting?
simonHow to identifiy which column was sorted having different reports on page?
just use:
'YOUR_STATIC_REGION_NAME' instead of p_static_id,
:APP_ID for p_app_id,
:APP_PAGE_ID for p_page_id
:APP_USER_ID for p_app_user.
and dont forget to grant SELECT on #OWNER# to APEX_030200.WWV_FLOW_PREFERENCES$
good luck and thank you Juergen.Schuster
Simon -
How to get last date of the week
hi,
how to get last date of the week like FM WEEK_GET_FIRST_DAY gives the date of the first day of the week i need the date of the last day of the week..
thnxdata : p_week type KWEEK,
p_Date type SYDATUM.
p_week = <incoming value in week of year>
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
week = p_week
IMPORTING
DATE = p_date
EXCEPTIONS
WEEK_INVALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
To get the last day of the week.
p_date = p_date + 6.
You can find the available fm in the system from se37 transaction code. -
How to get last day of prev month?
SELECT to_char(SYSDATE, 'MM') -1, last_day(sysdate)
FROM DUAL;
If current month is April, How to get the last day of March? Thanks.SQL> select sysdate, trunc(sysdate, 'mm') - 1 from dual ;
SYSDATE TRUNC(SYSDA
06-APR-2004 31-MAR-2004
1 row selected.
SQL> -
How to get last geo position, after 24 hours offline?
I lost my iphone 5. Then i use the app "find my iphone". And it told that its offline, and i coudnt see the last geo position. How can I get last geoposition?
Unless you installed a "finder" app that would upload that information there is no way to get previous locations.
-
Hello
I made a script to install the plugin because it needs some libraries to be installed as well, but during the installation, the filter directory isn't defined (it isn't the same for each platform or language)
for example my filter folder is :
E:\Program_Files\Photoshop CS2\Modules externes\Filtres
how do i get this filter directory from registry (or with another way)
thanks a lot
Jeffsorry i made a little mistake (didn't poste the updated version of my code)
here is the right code:
[Code]
var
maxnb8bf : Integer;
maxDirectory: String;
nb8bf : Integer;
PreviousDirectory: String;
procedure ProcessDirectory (RootDir: String; Progress: Boolean);
var
NewRoot: String;
FilePath: String;
FindRec: TFindRec;
n1 : Integer;
n2 : Integer;
begin
NewRoot := AddBackSlash (RootDir);
if FindFirst (NewRoot + '*', FindRec) then
begin
try
repeat
if (FindRec.Name <> '.') AND (FindRec.Name <> '..') then
begin
FilePath := NewRoot + FindRec.Name;
if FindRec.Attributes AND FILE_ATTRIBUTE_DIRECTORY > 0 then
ProcessDirectory (FilePath, Progress)
else
begin
if (NewRoot <> PreviousDirectory) THEN
begin;
if (maxnb8bf < nb8bf) THEN
begin;
maxnb8bf := nb8bf;
maxDirectory := PreviousDirectory;
end;
nb8bf := 0;
end;
n1 := Pos('.8bf', FilePath);
n2 := Pos('.8BF', FilePath);
if ((n1 > 0) or (n2 > 0)) THEN
begin;
nb8bf := nb8bf + 1;
end;
PreviousDirectory := NewRoot;
end;
end;
until NOT FindNext (FindRec);
finally
FindClose(FindRec);
end;
end;
end;
function InitializeSetup(): Boolean;
var
V: string;
begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Photoshop.exe', 'Path', V) then
MsgBox('Value is "' + V + '"', mbInformation, MB_OK);
Result := TRUE;
maxDirectory := '';
nb8bf := 0;
PreviousDirectory := '';
maxnb8bf := 0;
ProcessDirectory (V, true);
//if (maxDirectory <> '') THEN
// begin;
// MsgBox('Value is "' + maxDirectory + '"', mbInformation, MB_OK);
// end;
end;
function NewTargetDir(Param: String): String;
begin
Result := maxDirectory;
end;
Regards -
How to get J2EE installation directory?
when we install J2EE, we install it in a directory, i.e.
c: \ j2sdkee1.4
but how to get the directory programmatically on Windows OS using Java or C++ launguage?
thxbring to top to get answer
-
How to get last used IP addres of my stolen mac?
Hello, my mac was stolen. I was notified about address where it was used, also status changed to "Locked". How can I get last IP address of my mac, because it's the only way how I can help to police.
Unfortunately, there is only the information which shown to you by "Find My iPhone".
-
How to get last date of mapping execution?
Hi all,
Anybody knows how to get the last run date mapping? I try to develop incremental load, but i don´t know get the last date of mapping execution ok.
anybody can help me, thanks in advancedHi,
In our project we also use last_run_date to detect the delta for incremental loading.
We created a table which holds the run date and time for each mapping. When a mapping is new (initial load) the run date is set to 01/01/1900.
In each mapping we added a post-mapping process that inserts a record in the process table with the mapping name and last run date.
We also added a Constant operator to all mappings, calling a procedure to get the last_run_date out of our own process table.
The constant attribute is then used in a FILTER operator to compare the dates and select only dates after the last run date.
==============================
An other option is to use the get this information out of the runtime audit tables.
ALL_RT_AUDIT_EXECUTIONS which reside in the runtime owner schema.
Regards,
Ilona -
How to get jdk installation directory programmatically?
when we install jdk, we can select a directory to install it, i.e.
F:\myfolder\jdk1401
this is not JRE directory and can not be got by java method System.getProperties()
my Q is:
how to get the directory progammatically in Java program?
thxMost commercial software gives the user the oppotunity to specify the JDK they want to use. Some search for the JDK for them, but often involve a directory search. The registry trick should work, but you need to check the directory still exists. The user can move/delete it without the registry being updated, this is very easy if the drive is a network drive.
Note:
if the jdk is installed on a network drive, the registry may not be setup for each user. They can see it but it does not appear in the registry.
If you setting up a web server e.g. tomcat, it typically runs as a different login id to the user installing it. Network drives are different for different users, so network drive letters may not work. Using the UNC instead of the drive letter can get around this problem.
If the user tries to install his run anay where software on a non-windows system, there will be no registry.
Good Luck. -
How to get last modified date and time of a file which is in apache server.
Hi ,
I need to get last modified date and time of a file in remote machine.
This file is in remote machine which has apache server installed.
I am trying to get this information by connecting to apache server from client by giving absolute URI of the file to file object.
URI is got from apache server URL by using toURI method.
when I use lastModified method , its throwing exception , because scheme of URI is not file.
I can't give scheme as file because ftp server is not installed on that server
Is there any other way to get this information .No, unless you can use an FTP client.
-
How to get last row and sum of all columns in one query
Hi ,
is there a way to get last record for a column and sum of all record for another column in the same query.
Best Regards ,You should define your requirements properly for volunteers to help here..
Your data is not good enough to provide you accurate solution. Reason being you dont have a proper column which differentiates between first and last entry.
The solution becomes easy based on your desgin.
I have introduced a grouping column called "id" and a time column called "time_of_insert" (only this way you can confidently say that you can differentiate between first and last (also a fool proof solution) --- you may optionally use sequence(instead of date though if you say you may end up inserting two rows at the same time, then probably sequence would be a better choice to differentiate rather than a timestamp field) etc...)
With your sample data something like this can be done to achieve your desired result.
WITH dataset AS
(SELECT 1 id,10 used, 8 remain,systimestamp+1/24 time_of_insert FROM DUAL
UNION ALL
SELECT 1 id, 1, 7,systimestamp+2/24 FROM DUAL
UNION ALL
SELECT 1 id,2, 5,systimestamp+3/24 FROM DUAL
UNION ALL
SELECT 1 id,1, 0,systimestamp+4/24 FROM DUAL
UNION ALL
SELECT 1 id,0, 0,systimestamp+5/24 FROM DUAL
UNION ALL
SELECT 1 id,1, 4,systimestamp+6/24 FROM DUAL)
SELECT *
FROM (SELECT SUM (used) OVER () sum_all,
FIRST_VALUE (remain)
OVER (PARTITION BY id ORDER BY time_of_insert DESC)
last_row
FROM dataset)
WHERE ROWNUM = 1;
Output:
SUM_ALL LAST_ROW
15 4
Cheers,
Manik.
Maybe you are looking for
-
i changed my email because i couldnt access the last one so i thiught thatd help but it didnt.. and i cant get on my account at all to sync my phone. Why is it doing this? Like, whats the problem? It keeps saying "itunes temorarly un available" and i
-
Transport of code long texts - QKATALOG
Hello, I want to transfer the long texts for the defct codes in QM. There are two SAP notes about this 38570 & 61049. I am aware of the usage of long text transfer. Do that for several other texts regularly. I noticed that there is a problem in the n
-
Tolerance limit value at Vendor level
Dear Consultant Transport Vendor have certain value(suppose Rs 5crores) for TDS certificate , during creation PO partially(suppose 3lac) amount maintain on freight condition , system should accept up to that amount( Rs 5Crores) during MIRO , I mea
-
Hi to all, could anybody answer some doubts I have regarding the version of my N80 is: Soft: V 4.0623.0.41 (not the last, but could not upgrade via NSU like many others) - 26-07-2006 - RM-92 (what is the meaning of this 92?) - Nokia N80 (19)(what is
-
Where can I purchase Photoshop CS4 for Mac with a serial number
Looking to upgrade to CS4 on my mac, where can I purchase a copy with a serial number