<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Java dropbox GUI in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152799#M5104</link>
    <description>&lt;P&gt;Where are you stuck exactly? Are you having trouble with the&amp;nbsp;Dropbox portion of this? If so, what error are you getting?&lt;/P&gt;
&lt;P&gt;The matter of building a GUI around it is out of scope for&amp;nbsp;Dropbox API support so I'm afraid this wouldn't be a good place for help with that aspect of your project.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jan 2016 00:09:13 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-01-01T00:09:13Z</dc:date>
    <item>
      <title>Java dropbox GUI</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152798#M5103</link>
      <description>&lt;P&gt;How would one go about creating a uploadFile method in Java that has a GUI? for example I am trying to use JFileChooser to execute a selected file in which I can click on the file and call the file and pass it into a file then send it out as a fileInputStream so looking at the code cause its a lot easier to explain.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JFileChooser fc = new JFileChooser();&lt;/P&gt;
&lt;P&gt;fc.getSelectedFile();&lt;BR /&gt;&lt;BR /&gt; File inputFile = fc.getSelectedFile();&lt;BR /&gt; FileInputStream inputStream = new FileInputStream(inputFile);&lt;BR /&gt;&lt;BR /&gt; try {&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; DbxEntry.File uploadedFile = client.uploadFile("/javaroots.jpg",&lt;BR /&gt;&lt;BR /&gt; DbxWriteMode.add(), inputFile.length(), inputStream);&lt;BR /&gt;&lt;BR /&gt; String sharedUrl = client.createShareableUrl("/javaroots.jpg");&lt;BR /&gt;&lt;BR /&gt; System.out.println("Uploaded: " + uploadedFile.toString() + " URL " + sharedUrl);&lt;BR /&gt;&lt;BR /&gt; } finally {&lt;BR /&gt;&lt;BR /&gt; inputStream.close();&lt;BR /&gt;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; }&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:37:04 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152798#M5103</guid>
      <dc:creator>travis h.4</dc:creator>
      <dc:date>2019-05-29T09:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Java dropbox GUI</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152799#M5104</link>
      <description>&lt;P&gt;Where are you stuck exactly? Are you having trouble with the&amp;nbsp;Dropbox portion of this? If so, what error are you getting?&lt;/P&gt;
&lt;P&gt;The matter of building a GUI around it is out of scope for&amp;nbsp;Dropbox API support so I'm afraid this wouldn't be a good place for help with that aspect of your project.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jan 2016 00:09:13 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152799#M5104</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-01T00:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Java dropbox GUI</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152800#M5105</link>
      <description>&lt;P&gt;Thanks for the response Gregory,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, I am having troubles in context of the actual file upload method. The main guts of the program; user logging into dropbox and getting a access link etc. is working and connecting fine with no problems but when the upload method is executed I am getting errors (posted below this reply) the File object ( File file = getSelectedFile(); or File file = new File(); ) is all in red underline?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also have a question posted in StackoverFlow pertaining to this question if you would like to look perhaps&amp;nbsp;&lt;A href="http://stackoverflow.com/questions/34505240/file-fileinputstream-issue?noredirect=1#comment56752945_34505240" rel="nofollow noreferrer"&gt;http://stackoverflow.com/questions/34505240/file-fileinputstream-issue?noredirect=1#comment56752945_34505240&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If you would like any more info. in context of this I can post the whole program as well if need to be. I appreciate your response, Happy New Year!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OUTPUT:&lt;/P&gt;
&lt;P&gt;Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: Uncompilable source code - no suitable constructor found for File(java.lang.String) constructor com.dropbox.core.DbxEntry.File.File(java.lang.String,java.lang.String,boolean,long,java.lang.String,java.util.Date,java.util.Date,java.lang.String,com.dropbox.core.DbxEntry.File.PhotoInfo,com.dropbox.core.DbxEntry.File.VideoInfo) is not applicable (actual and formal argument lists differ in length) constructor com.dropbox.core.DbxEntry.File.File(java.lang.String,java.lang.String,boolean,long,java.lang.String,java.util.Date,java.util.Date,java.lang.String) is not applicable (actual and formal argument lists differ in length) at daword.dropBox.actionPerformed(dropBox.java:173) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jan 2016 01:14:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152800#M5105</guid>
      <dc:creator>travis h.4</dc:creator>
      <dc:date>2016-01-01T01:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Java dropbox GUI</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152801#M5106</link>
      <description>&lt;P&gt;I should highlight also that I'm not trying to focus on the GUI question I am having success with that portion its just simply this bit of code hanging me up...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public void uploadFile() throws FileNotFoundException, DbxException, IOException{&lt;/P&gt;
&lt;P&gt;fc = new JFileChooser();&lt;BR /&gt; fc.setMultiSelectionEnabled(true);&lt;BR /&gt; //fc.setFileSelectionMode();&lt;BR /&gt; &lt;BR /&gt;int dialog = fc.showSaveDialog(this);&lt;/P&gt;
&lt;P&gt;if (dialog == JFileChooser.APPROVE_OPTION) {&lt;/P&gt;
&lt;P&gt;inputFile = fc.getSelectedFile();&lt;BR /&gt;inputFile.getAbsoluteFile();&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;try{&lt;BR /&gt;FileInputStream inputStream = new FileInputStream(inputFile); &lt;BR /&gt;// this is where its not uploading all the code above is running fine&lt;BR /&gt; &lt;BR /&gt; uploadedFile = client.uploadFile(homeDir,&lt;BR /&gt; DbxWriteMode.add(), inputFile.length(), inputStream);&lt;BR /&gt; String sharedUrl = client.createShareableUrl(homeDir);&lt;BR /&gt; System.out.println("Uploaded: " + uploadedFile.toString() + " URL " + sharedUrl);&lt;BR /&gt; } catch (IOException e){&lt;BR /&gt; } &lt;/P&gt;</description>
      <pubDate>Sun, 03 Jan 2016 11:00:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152801#M5106</guid>
      <dc:creator>travis h.4</dc:creator>
      <dc:date>2016-01-03T11:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Java dropbox GUI</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152802#M5107</link>
      <description>&lt;P&gt;Note, for anyone following along who may be having the same problem, another one of our developer advocates offered an answer on &lt;A href="http://stackoverflow.com/a/34550162/1305693" target="_blank" rel="nofollow noreferrer"&gt;the StackOverflow question&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jan 2016 07:49:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Java-dropbox-GUI/m-p/152802#M5107</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-01-04T07:49:10Z</dc:date>
    </item>
  </channel>
</rss>

