Set location in runtime..

Hi
usually i used to save file like this
String retreive = textarea.getText();
          RandomAccessFile logfile = new RandomAccessFile("c:\\saved.txt","rw");
          logfile.writeBytes(retreive);
          JOptionPane.showMessageDialog(null,"Saved ..","Saved...",JOptionPane.WARNING_MESSAGE);
          catch(IOException e)
          System.out.println("cannot write on to log file....");
          }But it works correctly , i set location inside that and it will save file as i set the location..
How can i save and decide where to save the file at runtime...
i mean when i press save button i want to select the drives and save it to the folder as i wish...
is there any suitable solution.???

Use a JFileDialog to get the location from the user and use that instead of hardcoding c:\\saved.txt.

Similar Messages

  • Issue with changing database location at runtime

    I am having a similar issue to:
    Re: Issue with changing database location at runtime
    where I am using Crystal Reports 2008 SP 3 fix pack 3.3 and a OLE DB connection to a SQL 2008 R2 server. Running on a computer on the network where the report can see the original development server is fast, other computers where that server is not available are hanging 20 seconds before coming up.
    I am using the same code from the Crystal Sample app to change the connection on each table. I found that the slowness comes the first time the ReportDocument object is accessed to get the collection of database tables, before the connection info is set.
    Fix pack 3.4 was mentioned in that post.  Does fix pack 3.4 fix that issue? I don't see fix pack 3.4 on the downloads page (https://websmp130.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/bobj_download/main.htm)

    I just found on the reports that were having the issue there was a SQL Expression.  Per this thread:
    Re: Report load is slow after changing database servers
    There was an issue with that and the fix is not out til the end of Feb so I found a way not to use the SQL Expression and the speed is much better.
    However, your information provided led me to this post:
    Cannot Change Table Location, but Only for One Report
    And I am also experiencing an issue where the table location is not changing on one subreport and I will look into that as a possible solution.
    Thanks so much for your help.

  • AutoScrolling of PanelLayout and setting Location of dynamically created controls

    Hi, I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up.
    So basically I have wrote a code that lets me drag on control over other other and replace their's locations.
    So I wanted to add possibility for user to dynamically add new controls (every new control is suppose to be 200px below previous) - everything is fine as long as I add them from upper section of my LayoutPanel (without scrolling) but when I try to add
    them while I'm half dawn scrolled they are placed based on CURRENT left upper corner which is NOT a upper left corner of LayoutPanel therfore they are placed with wrong padding based on current scrolled position.
    So my question is how can I avoid it and always add new controls based on LayoutPanel upper left corner? (I have already tried disabling AutoScroll while adding new control and enabling it back after adding - it works but I want to find PROPER way because
    I'm sure there must be some kind of solution to it)
    Thanks in advance.

    Hi darekg11,
    >> I have a question related to setting Location of dynamically created controls when my PanelLayout is scrolled down or up
    I am wondering what the PanelLayout was, was it a “flowLayoutPanel” or “tableLayoutPanel”?
    >> basically I have wrote a code that lets me drag on control over other other and replace their's locations
    Did you mean you drag the control at runtime or at design time?
    >> how can I avoid it and always add new controls based on LayoutPanel upper left corner
    I could not reproduce your issue, and could you share us some key code or a simple demo to reproduce your issue?
    I made a research about “scrolling panel”, and I think the link below might be useful to you:
    # Scrolling Panel
    http://www.codeproject.com/Articles/226381/Scrolling-Panel
    Best Regards,
    Edward
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

  • Get Siri to set location reminders (using multiple reminder lists)

    I found a way to get Siri to set location reminders using multiple reminder lists (but you can just use one list too):
    First make additional lists in the reminder app: click list button (the lines on the left) > edit > create new list > done. Make as many as you want. I have grocery, home, personal, business, family.
    Let's say you want a reminder to pick up apples when you get to the apple store. You must add the location in your contacts to your name in contacts.
    Do the following:
    In maps app find the location with search.
    Tap the blue arrow > Add to contacts > Add to existing contact
    Choose your name in contacts. It will be added under your address for home or work so you will need to edit it:
    Click Edit.
    Click on the small label on the left of the new address - it will just say "address"
    Scroll to bottom of page and click on Create custom label
    Enter the location name like "Apple Store". Click Done.
    Important Note: You will need to delete the url it adds under your home url section and maybe other things it messes up with the new contact info instead of yours - so check all the fields each time you do this.
    To make a location based reminder using a specific list you must open that list yourself - Siri will not open it for you.
    Example:
    Open grocery list yourself in the reminders app
    Tell Siri something like: "remind me to pick up apples" (Do not mention the location yet - if you do it will not work)
    Siri will ask: "When should I remind you?"
    Say: "When I get to the apple store"
    Siri will say she will remind you and you will see the location reminder in the grocery list.
    This is how it works for me but if you know an easier way let me know! This is beta so I'm sure it will get easier.

    I have one thing to add.  You don't have to open the list manually.  Tell Siri:  "Add to my <listname> list".  For example, if you have a list named "Work", tell Siri:  "Add to my work list".  Siri will reply, "What should I add to your 'Personal' list?
    and you can continue from there. 
    There is a syntax for doing all this in one sentence, but I find it only works about half the time. Too many fields for Siri to parse in her current Beta stage
    /d

  • CRM 5.2,  how to define an assignment set in the runtime depository?

    We are using CRM 5.2. I have created a new component and view and the view is exposed as an interface view. Now i have to include this in the overview page of BP_HEAD component. I have enhanced BP_HEAD component and enhanced the view required as well( View Name BPHeadOverview). I have added my new component as the used components in BP_HEAD.
    But when i open the enhanced view, i don't see any available assignment blocks. Standard overview page of BP_HEAD had some available assignment blocks but the enhanced one doesn't. Also following message is shown  "Define an assignment set in the runtime depository". How can i add my new component and interface view to the available assignment blocks of the overview page of BP_HEAD? Thanks for your help.
    Regards
    Hari

    Hi Sudipta,
    Thanks for your help. I am making good progress.
    I believe i am quite close to completion now. Need your help with following questions though -
    1) I have a context node BUILACTIVITY. Now i need to only display partial list from this context node? Is there a way i can do this directly with the context node or i have to create a new node and manipulate? If so any tips there?
    2) When i create new view it doesn't have graphical representation option any more? Is it that way only? If so can i just create table view and use it?
    3) When i create a form view and try to insert a table using <crmic:tableView> tag, i am getting an error messge saying "//BUILACTIVITY/Table" is not a table? What could be the issue?
    Thanks a lot for your help again.
    Regards
    Hari

  • Set Location of individual text box - report design

    Post Author: sonjeeva
    CA Forum: Crystal Reports
    Hi Guys,
    Is it possible to set location of an individaul text box to be at the end of report? I know if I have this at end of report area it would work. But my report has a sub report in end of report area and the text box doesn't appear at the end of both reports.
    Cheers
    Sonny

    Post Author: kcheeb
    CA Forum: Crystal Reports
    If you are creating the report through code (C#, VB etc.) you could get the location/size of the subreport and then set the text box location based on those parameters.
    I don't think it's possible from within the Crystal report designer itself. At least I couldn't find a place to do this.

  • Error in View configuration "Define an assignment set in the runtime rep.."

    I have enhanced a standard component u2018BP_HEADu2019 and have enhanced the view u2018BP_HEAD_OVERVIEWu2019 in it to work on the configuration. But when I go to the configuration tab it says, "Define an assignment set in the runtime repository" and I do not see any blocks on the left side of the configuration.
    Am I missing anything in the runtime repository?

    HI,
    You cannot modify the SAP default views. You have to define a role key at:
    IMG -> CRM -> UI Framework -> Define Role Configuration Key.
    Once you have defined the role configuration key you need to assign your role configuration key to your business role at:
    IMG -> CRM -> Business Roles -> Define Business Roles
    Select your business role and click on "Details" icon and you would need to assign your role key there.
    In the Web UI configuration you need to first copy the configuration and in the next step you would do the necessary modification. During copying of the configuration you would need to mention your Role Key.
    Regards,
    Deepak

  • Set location  - CR 8.5 vs CR XI

    I didn't find exact answer to my question.
    Short overview. CR layouts are used in ERP system just reading and formating data from SQL 2005 prepared by special stored procedures. Main clue is to use the same layout for production and test databases (with many different names).
    After link new table in CR 8.5 there was only a need to change 'Set location' -> 'Location: Table' from <database name>.dbo.<table name> to <table name> and it works fine.
    Now I'm switching CR layouts to CR XI R1 SP4 (the newest one supported by ERP) but can't find the same possibility like described for 8.5. All new tables based on OLE DB have 'catalog: <database name>' which I cant change. Even if 'Initial catalog' is empty there is always database name in table properties which causes building queries like 'select ... from <database name>.dbo.<table name>' instead of <select ... from <table name>'.
    How to enable behavior known from 8.5 in XI?

    Solution:
    Entering manually table name in 'Overridden Qualified Table Name' without database name solves the problem.

  • Setting locations with your iPhone 4s

    I am pained to admit this, but I cannot figure out how to set locations in my iphone4s that I can set reminders to alert me to do whatever task I had previously set for myself to accomplish when I arrive at the noted location. What types of steps and preferences do I need to select and apply so I can hear Siri tell me as I pull into a lot or walk into a store at one place or another to be reminder of the "note to self" I created earlier to help ensure the purchase of specific goods or anything for that matter! Thanks for helping me out with the awesome function available on my phone that has done nothing but mock my ridiculous inability to master the ins &amp; outs of the program.

    Make sure you have an entry in your contacts for yourself that includes your work address. Then, go to Settings>General>Siri and make sure that your contact is selected for "My Info". For other locations, make sure that there is a contact with the correct address.

  • Set location of components and reduce the size

    I want to resize JavaFX component and shrink the components which are next to it. Here is the result which I get:
    When I click on the angle of this component I can resize it down and right.
    http://i.stack.imgur.com/jqoNW.png
    The components which are next to it are pushed down and right. Part of them are behind the visible part of the screen.
    http://i.stack.imgur.com/rsi0L.png
    All components are placed in BorderPane,VBox,HBoxand againBorderPane. I don't want to allow components to move. I want to shrink them and use Scrollpane` when their size is reduced. Can you give me some hits how to solve these two problems?
    Ref javafx 2 - Set location of components and reduce the size - Stack Overflow

    I did something similar the other day. Based on the resizing of the scene I adjusted the position.
    widthProperty().addListener(new ChangeListener<Number>() {
        @Override public void changed(ObservableValue<? extends Number> observableValue, Number oldSceneWidth, Number newSceneWidth) {
            widthChange((Double)oldSceneWidth, (Double)newSceneWidth);
    heightProperty().addListener(new ChangeListener<Number>() {
        @Override public void changed(ObservableValue<? extends Number> observableValue, Number oldSceneHeight, Number newSceneHeight) {
            heightChange((Double)oldSceneHeight, (Double)newSceneHeight);
    You should be able to do something similar, when you add a change listener to your component and handle the resizing of the other components.
    What I don't understand is why you would need a scrollbar, when the components shrink down. I would think it would be the other way round.

  • How do you set location based reminders with location restrictions turned on?

    I can set location based reminders with location restrictions turned off, but I want them on. Otherwise if I lost or if somebody stole my iPhone they could just turn off the find my iPhone function. Yet if I have location services restricted to prevent this then location based reminders are unavailable. Any help would be appreciated

    I can set location based reminders with location restrictions turned off, but I want them on. Otherwise if I lost or if somebody stole my iPhone they could just turn off the find my iPhone function. Yet if I have location services restricted to prevent this then location based reminders are unavailable. Any help would be appreciated

  • Message error "Define an assignment set in the runtime repository"

    Hello Experts,
    I'm creating a new component and when I'll assign the view created to be displayed in the screen the follow message appears "Define an assignment set in the runtime repository".
    Best regards,
    Caíque Escaler

    Hi,
    I am sure that when you Click on your view in component workbench, this message must be flashing up.
    Correct me if i am wrong.
    Now first thing is its not an error but an info message.
    There is nothing wrong in your developments. It just the fact that just creating a view does not mean we can use it. To use it, you must assign it to either a Window or a View Set or an Overview page in Runtime repository and thats why system tell you that you must do the view assignment.
    Go to the runtime repositoy and assign the view. Now whether it to be assigned to a viewset, overviewpage or window, depends upon your requirement. If your view is Assignement Block, you will attach it to an overviewpage . If its a separate edit/display view then you may attach it in existing viewset or Main Window.
    You can also create an empty window and attach your view to it..Ultimately view assignment completely depends upon what you want the view to be used as.
    Hope it solves your problem.
    Regards,
    Suchita

  • Logic plug in setting locations?

    Hi, I'm still kind of new to Mac's and a few weeks ago I was cleaning up and re-orginizing some of my folders. I wasn't aware that mac's are much, more folder specific than a windows OS?  While moving various files/folders when cleaning/orginaizing, I must have moved some of my 3rd party logic folders?  I didn't move any of the actual au componnets they are still in the correct place so that logic can locate them.  Only problem now they can't seem to locate them even though the components show in the correct component folder?  Did I mess something up by moving folders around?  I had assumed as long as I didn't mess with things like the actual component and preset folders that it didn't really matter if I moved I guess what you would call the plugins' main root folder, if that sounds right? 
    Appart from probably having to trash everything and re-install is there anything I can do?  Perhaps a quick fix like ,"just drag/move all my 3rd party plug ins to such and such folder?  I don't understand why in a mac that you can't just create a new folder and  call it, "logic plug in related files"  for example;  and move all of your 3rd party plug ins over to it(except for the actual commponents of course)?  Or can you?  I guess I'm just generaly copnfused about plug in setting locations for both 3rd party and non.  Am I correct in saying that plug in setting location folders can actualy vary from 3rd party to 3rd party plug ins? If this is true what a pain! Like I said I probably have no other option except to delete and re-install?  I wish my mac could be brought back to how it was before I messed with any folders!  Trouble is to free up hard drive space I got rid of a bunch of time machine backup so I don't think I can go back to a previous state before I moved any stuff around:(
    I just don't get it though and its very annoying.  For example, I have a lexicon reverb bundle, always worked great;the correct components are still in the correct audio/plug in/commponent folder, but ever since I moved some root plug in files around the lexicon plug ins no longer show up.   They don't even show in the AU manager,which is frustrating becasue I can go to the component folder and they are physicaly there!  Why would it not even show in the AU manager if the component is physicaly in the right place still?Help please...Wha did I do/What do I do?
    Thanks everybpody,
    Mike

    A line across a plugin usually comes from trying to insert a mono plugin on a stereo track of vice versa. Could this be your problem.
    I've rearranged my project folders many times without any problem whatsoever. Have you saved your projects with Assets?
    R

  • How set location for tooltip text ??

    hi ,
    i want to set tooltip location myself to a button . for this i override methods are
    1. public String getToolTipText(MouseEvent e)2 public Point getToolTipLocation(MouseEvent e)here is code... where i have to change to set location for tooltip
    * DebugGraphicsTest.java
    * Created on April 28, 2005, 1:14 AM
    package swingtest;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * @author  Paramasivam
    public class DebugGraphicsTest extends javax.swing.JFrame {
        public DebugGraphicsTest() {
            initComponents();
            MyButton  btn = new MyButton("Chem m e");
            btn.setToolTipText("this is actual");
            getContentPane().add(btn);
            jButton1.setToolTipText("button 1");
            jButton2.setToolTipText("button 2");
            jButton3.setToolTipText("button 3");
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jPanel1 = new javax.swing.JPanel();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            jButton3 = new javax.swing.JButton();
            getContentPane().setLayout(new java.awt.FlowLayout());
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jButton1.setText("jButton1");
            jPanel1.add(jButton1);
            jButton2.setText("jButton2");
            jPanel1.add(jButton2);
            jButton3.setText("jButton3");
            jPanel1.add(jButton3);
            getContentPane().add(jPanel1);
            pack();
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new DebugGraphicsTest().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JButton jButton3;
        private javax.swing.JPanel jPanel1;
        // End of variables declaration
    class MyButton  extends JButton{
        public MyButton(String s){
            super(s);
        public Point getToolTipLocation(MouseEvent evnt){
            return new Point(100,300);
        public String getToolTipText(){
            return "hihi";
        public String getToolTipText(MouseEvent me){
            return "event hihi";
    }

    Adding the line ToolTipManager.sharedInstance().registerComponent(this); to MyButton's constructor seems to solve the problem.

  • [svn] 2283: adding FlexClientManagerControl MBean tests to correct location under runtime\messaging\client

    Revision: 2283
    Author: [email protected]
    Date: 2008-06-27 11:01:17 -0700 (Fri, 27 Jun 2008)
    Log Message:
    adding FlexClientManagerControl MBean tests to correct location under runtime\messaging\client
    Added Paths:
    blazeds/branches/3.0.x/qa/apps/qa-regress/testsuites/mxunit/tests/MBean/runtime/messaging /client/
    blazeds/branches/3.0.x/qa/apps/qa-regress/testsuites/mxunit/tests/MBean/runtime/messaging /client/FlexClientManagerControl.mxml

    The C compiler and optimizations are specified in the $ORACLE_HOME/javavm/jahome/Settings_os.properties file.
    On Linux (on Solaris these are slightly different but quite similar to
    Linux):CC = gcc
    c.compile.opt.level = -O3
    LINK_COMMAND = ld -shared -h $(@:f) -o $@ $<
    On Windows:
    CC = $(visual.c.home)/bin/cl
    c.compile.flags.platform = -Ox -Oy-
    LINK_COMMAND = $(visual.c.home)/bin/LINK /DLL /OUT:$@ \
    /LIBPATH:"$(visual.c.home)/lib" /DEF:$(*:b).def $< \
    $(oracle.home)/lib/orajox10.lib /NODEFAULTLIB msvcrt.libkernel32.lib
    You can find more details on NCOMP in chapter 2 of my book
    Kuassi, http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html

Maybe you are looking for

  • Printing double sided brochures with InDesign

    I'm trying to print my brochures double sided with InDesign but I'm really having a devil of a time doing it. The brochure is 8 pages long (each page is 5.5 x8.5 therefore two double-sided 8x11s). The problem is that my printer does NOT print duplex,

  • Shifting library to external HD

    Sorry if this is repeating previously asked questions, but I couldn't find an exact answer... I'm in the process of shifting my library to an new external HD. I want to be sure to keep all the playcount and playlist information. I've copied the whole

  • Buy new iphone with just 30 days warranty (need help pls)

    Hi all, i've just bought an iphone 4s 32Gb with zp code (hongkong) for my friend on February 11 2013. and didn't activate it until now i looked up in estimated expiration date ended on April 13 2013. I have no ideas why it's happen. Can somebody plea

  • Vertically sync time position for two or more 2D axis systems?

    In DIAdem: VIEW, Is it possible to vertically sync the time position for two or more 2D axis system charts placed above each other? I have displayed several channels on one 2D chart, and one channel of particular interest on a separate chart above, w

  • Auto increment VALUE attribute extension

    I was wondering if there was such an extension or a built in tool for Dreamweaver that searches for all <INPUT> tags of TYPE 'checkbox' and sets a unique value for the VALUE attribute. Example: I have 3 checkboxes as follows: <INPUT ID="chkOption1" T