User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 455,964 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,630 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 586 | Replies: 1
Reply
Join Date: Nov 2007
Location: ATHENS
Posts: 3
Reputation: nikolaos is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nikolaos nikolaos is offline Offline
Newbie Poster

jdic browser and right container

  #1  
Nov 17th, 2007
i am trying to make an autorun cd with a digital book in java.
1) How can i find out the cd or dvd drive letter in which has entered my cd?
in the code section below i use this very ugly way to achieve this.
2)which is the best container that i can use with org.jdesktop.jdic.browser?

 
final Container pane = getContentPane();
driveletter = JOptionPane.showInputDialog(null , "ENTER THE DRIVE LETTER (ENGLISH) OF THE CD OR DVD YOU ARE USING ");
    driveletter = driveletter.toUpperCase();
    try {
      webBrowser = new WebBrowser(new URL("file:///" + driveletter + ":\\introduction.htm" ));
    
browserpane = new JScrollPane(webBrowser);
// browserpane.createHorizontalScrollBar(); // browserpane.createVerticalScrollBar(); browserpane.setBounds(new Rectangle(200,80,610,460)); //(x,y,width,height) pane.add(browserpane); setVisible(true); } catch (MalformedURLException e) { System.out.println("first use of browser before any chapter sellection " + e.getMessage()); }
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2007
Location: USA
Posts: 3,076
Reputation: Ezzaral is a splendid one to behold Ezzaral is a splendid one to behold Ezzaral is a splendid one to behold Ezzaral is a splendid one to behold Ezzaral is a splendid one to behold Ezzaral is a splendid one to behold Ezzaral is a splendid one to behold 
Rep Power: 15
Solved Threads: 306
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Posting Sensei

Re: jdic browser and right container

  #2  
Nov 17th, 2007
You could just iterate the available roots from File.listRoots() and check exists() to find it for them, since you know the file name you are looking for.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 9:03 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC