How JFileChooser finds the Desktop and can browse CIFS(SMB) in windows.
Hello.
I'm currently using serveral methods from FileSystemView used by JFileChooser to detect if a File is a system root, a floppy, or to find the "My Documents" folder under windows.
JFileChooser however is also able to provide a link to the desktop. How do I get that location from Java?
Further more. JFileChooser is able to browse and use resources located on the network using CIFS(SMB). I've searched through JFileChoosers source. But I can't figure out how it does this.
I'm currently writing a Folder synchronization app. As you can see in the screenshot ( http://users.telenet.be/greenhouse/Screenshot-7.png ) I'm trying to integrate the location browser (Look based on the GTK file browser) more into windows. I want my users to be able to browse CIFS just like in the JFileChooser. How do I do this?
The reason I'm writing my own browser is because the GTK one provided in Java is more then lacking. And I can provide browsing for remote resources more easily (like SFTP and SCP)
In short:
*JFileChooser however is also able to provide a link to the desktop. How do I get that location from Java?
*JFileChooser browses and uses CIFS in windows. How do I do this (without a 3th party library) the same way as JFileChooser does it?
Message was edited by:
finalbeta
JFileChooser fr = new javax.swing.JFileChooser();
FileSystemView fw=fr.getFileSystemView();
defaultfolder = fw.getDefaultDirectory().getPath();
String desktopfolder;
if(System.getProperty("os.name").startsWith("Windows")){
for(File tmp:fw.getRoots()){
dekstopfolder = tmp.getPath();
}That piece of code gives the path to the desktop folder in Windows. In linux it returns root. (getRoots();) How horrible.
I hope I'm going about this the wrong way. Because this would be an ugly Java API.
Similar Messages
-
How to find the Date and Time of Modification of Column in aTable?
Hi all,
Do you know how to find the Date and Time of Addition of Column to a Particular Table?.
I know however, How to find the modification time of the Table. Using the below Query :
Select Object_Name, to_Char(Last_DDL_TIME, 'DD-Mon-YYYY HH24:MI:SS') Last_DDL from User_Objects where Object_Type = 'TABLE';
Object_Name
Last_DDL
Employee
20-Aug-2013 09:23:03
I wanted to know the Creation or Modification Date and Timestamp of all columns of Employee Table?. Is it possible at all. If possible, How to get it?.
Regards,
Bhaskar MI agree with you on that. Since its a development enviornment I can remove the column but that not my point here.
My whole purpose it to know whether we get the Column's Creation or Modification DateTime. -
How to find the job and job status from RSPCM
hi all,
suppose we got an error and in rspcm the process was failed.i want to know the status of that particular job.and if any i want to stop that job in SM37.
plz tell me how to find the job and job ststus from RSPCM...and how to stop that job in SM37
thanks,
jackHi Jack,
RSPCM: T.Code
This transaction is used to monitor the process chains
First:
here you need to add the process chains into the sheet
Second:
Then you can monitor the process chains in this transaction code
Like you can see the : status ,proces chain ,Last run date ,Last run time ,Log ID
Status : Green when sucessful,Yellow when running & Red when you get errors
Now when yoy click on any of the process chain in RSPCM you will go to the LOG VIEW as you see in RSPC transaction
SM37:T.code
This transaction is used for Job Overview
you can see many options in SM37
like Released,active,cancelled,finished,etc
Just select the ACTIVE jobs and also pass STAR in JOB ID & USER ID
here you can only see the active jobs
Goto Step in toolbar
select the program displayed
then chose option GOTO - Variant in main menu bar
in the variant you can see the job belong to which Process chain
if you want to cancel this job come back to SM37 Display screen
Select the Job and select the JOB DETAILS tab in Tool Bar
Collect the WIP ( Work Permit ID)
Go to SM50 T.code and find the WIP
in Main Menu Bar you find the option Cancel with Core choose this it will cancel the Job
Regards
Hari -
How to find the Project and wbs Element System Status
Hi all,
How to find the Project and wbs Element System Status.
We can find the system status in the CJ20n transaction but I want the table and field name where it is stored.
Regards
RaghavendraHi,
try table <b>jest</b> with key = prps-objnr
Andreas -
How to find the header and item level status of a CRM contract ?
Hi,
Few questions
A. How to find the header and item level status of a CRM contract ? My req is to select all the contract line items which are in CLOSED status.
B. How to get the BPs associated with a contract ?
Anyone have the list of CRM tables and the relation amongst them. Please mail me in [email protected]CRMD_ORDERADM_H Contains the Header Information for a Business Transaction.
Note:
1. It doesnt store the Business Partner
responsible for the transaction. To
get the Partner No, link it with
CRM_ORDER_INDEX.
2. This table can be used for search
based on the Object Id(Business
Transaction No).
CRMD_CUSTOMER_H Additional Site Details at the Header Level of a Business Transaction
CRMD_LINK Transaction GUID set for all the Business Transactions
CRMD_ORDER_INDEX Contains Header as well as Item details for a Business Transaction.
Note:
1. It doesnt store the Business
Transaction No (Object ID).
To get the Business Transaction No
link the table with
CRMD_ORDERADM_H
2. This table can be used for search
based on the Partner No
CRMD_ORDERADM_I Stores the Item information for a Business Transaction. The scenarios where we have a Contract Header and within contract we have Line Items for the contract, this table can be useful.
E.g. Service Contracts
CRMD_CUSTOMER_I Additional Site Details at the Item Level of a Service Contract
Pl.reward points....... -
How to find the columns and tables used in a stored procedure?
Hi,
Can someone suggest how to find the columns and tables used within a stored procedure?
Thanks
VBKFor example:
SQL> create or replace
2 procedure p1
3 is
4 cnt number;
5 begin
6 select count(*) into cnt from emp;
7 end;
8 /
Procedure created.
SQL> select referenced_owner,
2 referenced_name
3 from dba_dependencies
4 where owner = 'SCOTT'
5 and name = 'P1'
6 and referenced_type = 'TABLE'
7 /
REFERENCED_OWNER REFERENCED_NAME
SCOTT EMP
SQL> SY. -
How to find the font and replace another font using javascript in illustrator?
Dear All,
how to find the font and replace another font using javascript [batch process] in illustrator?
i have 700 image file, it very deficult replace one by one.
regards,
.Suresh.SAsk the creator of the file for a unprotected version.
-
I have a FreeAgent GoFlex backup drive (for Mac) after a while the icon disappears from the desktop and can only be restored by reconnecting the firewire. This also happens when I use the USB connection as well. Thanks
Did you use any of the "sleep" drivers supplied? I have found it best to just totally reformat/erase the drives and let the OS handle them.
-
How to find the jre and j2ee version on RAD?
How to find the jre and j2ee version of RAD 6.0?
Hi Zhenglin,
You meen to say we have to create two custom fields, one each for the latitude and longituude. Once created, how do we upload the latitude and longitude based on address could you please expalin by giving some sample code.
Thanks in advance.
Thanks and regards,
Deepika C -
How to find the source and target systems of an imported Transport Request?
Hello,
How to find the source and target systems of an imported Transport Request?
chinna.Hi Chinna,
In your landscape the TMS must have configured.Let assume that you have four six systems in the land scape.
DEV->DEV1->QUA->PRD and other two systems (TR1 ,TR2)are at different domain amd both are connected to QUA and the requests are forwarded from there.Here normally the flow willl be from DEV to DEV1, then DEV1 to QUA and QUA to PRD.For other two systems (TR1 ,TR2 )the source system will always be QUA.
Regards
Ashok -
I cant find the desktop and dock
i neeed help
of course-you've come to the right place, nadon
Okay, the dock should be at the bottom of your screen, or on the left, or the right. It's usually where your most often used apps are. You can, of course, drag stuff into the dock and out again, as you need to. As for finding the Desktop---
Legend has it that it's above the dock and goes to the top of your monitor's screen, to both the right and left corner on the top and the right and left corner on the bottom. Do you see that Apple in the top left corner of the screen? Everything below that, basically, is the Desktop.
--I thought I've heard all kinds of questions, but you gave me one I've never heard before, and for that, I say "thank you" ---
If you are still stuck, nadon, ask someone else here or go into your local Apple store and ask someone there. I think you can arrange one-to-one classes which will teach you how to use your Mac. Sadly, no, they are not free.
John B -
How to Find the highest and lowest cell in a column and figure the difference
What I am tryng to do is have numbers find the high and low in Cloumn B and and put the difference in B6. So I would need it to Figure out that B3 is the highest and B2 is the lowest and give me the difference of .25 in B6
Don,
Begin by making Row 6 a Footer Row. You will find that option in the row tab menu that appears when you hover over the 6 tab and click the triangle.
Then enter this formula in B6:
=MAX(B)-MIN(B)
Regards,
Jerry -
How to find the product key on a preinstalled version of Windows 8?
This is a similar qustion:
https://forums.lenovo.com/t5/Windows-8-and-8-1-Knowledge-Base/How-to-find-the-product-key-on-a-prein...
But its not actually explaining which part of the BIOS menu contains the windows key.
I see a UUID number -- but that doesmt match the windows 8 5x5 code format. SO!
where can I locate the windows 8 key in the BIOS?On recent ThinkPad, the Product ID Key sticker has been moved from the bottom of the unit to behind the battery.
You need to contact Lenovo technical support directly to ask about recovery media. -
How to find the paragraph and line numbers [CS3] [JS]
Hello,
I have a script that finds certain text formatting. Rather than having the script select all the instances of this text I have an alert that lists the page number and the contents for each found instance. The following gets those.
var pageNumber = myFoundSet[n].parentTextFrames[0].parent.name;
var foundContents = myFoundSet[n].contents;
However, I would like to include the number of the paragraph where the found text resides as well as the line number in that paragraph.
I am stumped on how to do this. Would be nice if there were a parentParagraph and a parentLine.
Can someone point me in a direction?
Thanks,
TomTom,
Assuming that you're looking for the number of the paragraph on the page, you'd need to count the number of paragraphs in the text frame that a found item occurs in. Since indexes are always counted from the beginning of the story, you isolate the text between the top of the page and the found item by starting at the index of the first insertion point of the found item's parent text frame and the found item itself. You capture that with this single long line:
// range over ...
paragraph_number = myFoundSet[n].parentStory.characters.itemByRange (
// ... index of first ins. point of found item's parent text frame ...
myFoundSet[n].parentTextFrames[0].insertionPoints[0].index,
// ... and index of found item
myFoundSet[n].index
).paragraphs.length;
This includes any paragraph that started on the previous page. To find the found item's line number within its parent paragraph you do something similar:
line_number = myFoundSet[n].parentStory.characters.itemByRange (
myFoundSet[n].paragraphs[0].index, //first insertion point of paragraph
myFoundSet[n].index
).lines.length;
There's no need for parentParagraph and parentLine: myFoundSet[n].paragraphs[0] returns an item's parent paragraph, myFoundSet[n].lines[0], the item's parent line.
Peter -
How to find the Music and Movies folder in your Finder
I wish I bought a cheap computer with low GB space because MacBook Pro GB is not enough so you have to buy an external harddrive anyway.
Anyway I wanted to delete some music files but I couldn't delete it from the Disk Inventory. I remember someone from Apple navigating my files from the Finder Macintosh HD and saw how much GB of movies and music I had and then I could delete it then and there, but I can't find the folder he went to. I found it once after so much hard finding and then I got lost again as I tried to find it again today.
So how do you find that place?Whitecity wrote:
Out of interest, how much space is on your harddrive? Replacing it with a larger one is easy and cheap.
It is much easier to purchase an external HD and store the ITunes library on it.
Maybe you are looking for
-
YouTube play back choppy and not in color
Just got the Droid Maxx as the 'free' 2 year upgrade. Only had it a few hours and all seems fine (I'm old and don't need much to make me smile) except YouTube video is choppy and pixels are all out of whack. I search the internet for solutions (I'm
-
How to Create a Sequence Number from BI Publisher Layout editor?
How to Create a Sequence Number (1,2,3,4,......,etc) from BI Publisher Layout editor
-
Double clikc on oo alv and trigger OK_CODE?
I work with oo alv ,how to do it when I double clikc mouse then just like I push the detail button? what i want to do is when I double click mouse ,it works just like push the detail button on the toolbar , I did debug and get the function code just
-
How to recover photos from a reformatted CF card.
I accidentally reformatted my 1gb Lexar CF card while still in my camera with some photos I want to recover. I used Lexars Image Rescue program. It said it recovered 200 photos but I can't locate them. The image folder that it says they're in, is emp
-
I am unable to view or download bank statement from 2 different banks. Adobe Reader 9.2 does not open. A new window opens and then Safari crashes. Running OS X on G4 powerbook. Anyone know how to fix it?