2

Is there any way in java that I can see property window of local file in my Java Swing program?

enter image description here

Ronak Jain
  • 2,402
  • 2
  • 24
  • 38
  • Do you mean that you want to open this dialog from a Swing application or do you want to recreate this dialog with Swing components? – Guillaume Polet Jul 03 '12 at 07:39
  • This is potentially a WIN32 subject (uses shell32.dll as I think) –  Jul 03 '12 at 07:39
  • @Guillaume Polet: I want to open this dialog in swing application using java code. Is there any way to access that dialog? – Ronak Jain Jul 03 '12 at 07:42
  • *"Is there any way to access that dialog?"* Not on *nix or OS X, Which begs the question, why use Java? Note that it is possible to find some of the details seen in the Windows file info. pop-up using the `File` class. – Andrew Thompson Jul 03 '12 at 07:53
  • This [question](http://stackoverflow.com/questions/7985122/show-explorers-properties-dialog-for-a-file-in-windows) talks about doing this in python. – Guillaume Polet Jul 03 '12 at 08:18

1 Answers1

2

There's no standard Swing API for opening that dialog but you can still do it in Java using JNA which allows you to access native shared libraries with only Java code.

@Guillaume Polet has posted a link to a similar question with a Python implementation. You would have to get that code and translate it to Java. Alternatively, here's a C# example.

With the JNA tutorial and those examples you should be able to write a Java implementation.

Community
  • 1
  • 1
Trasplazio Garzuglio
  • 3,535
  • 2
  • 25
  • 25