Technical doubt about setBounds() method

Hi all.
I have a little doubt. I don't completely understand the behaviour of setBounds() method of a JComponent extending class.
I prepared a little test application to explain this doubt. Here it is:
import javax.swing.*;
import java.awt.*;
public class TestSetBounds extends JFrame{
    JPanel myPanel = new JPanel();
    MyComponent myComp = new MyComponent();
    public TestSetBounds() {
        super("SetBounds Test");
        setSize(480, 320);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        myPanel.add(myComp);
        setContentPane(myPanel);
        setVisible(true);
    public static void main(String args[]) {
        TestSetBounds tsb = new TestSetBounds();
class MyComponent extends JComponent implements Runnable
    // setting dimension properties
    int compWidth = 25;
    int compHeight = 50;
    // these values are for testing
    int xStart = 490;
    int xEnd = -12;
    Thread t;
    public MyComponent()
        super();
        setOpaque(true);
        setVisible(true);
        if (t == null)
            t = new Thread(this);
            t.start();
    public void paintComponent(Graphics g)
        super.paintComponents(g);
        setBounds(xStart, 160, compWidth, compHeight);
        Graphics2D area2D = (Graphics2D) g;
        area2D.setColor(Color.RED);
        area2D.fillRect(0, 0, compWidth, compHeight);
    public Dimension getPreferredSize() {
      return new Dimension(compWidth, compHeight);
    public Dimension getMaximumSize() {
      return getPreferredSize();
    public void run()
        for(   ; xStart > xEnd; xStart--)
            repaint();
            try
                {t.sleep(10);}
            catch (Exception exc) {}
}   I tested two situations:
a. Setting xStart = 100 and xEnd = -12, the application run how I expected. With negative value of x coordinate, my component is painted starting out of panel. We only can see my component portion which remains on the panel.
b. Setting xStart = 490 and xEnd = 300. My component is initially painted out of panel, like test a. During for-cicle, xStart value decreases, entering the panel width value. At this point I must see the component portion which remain on the panel.But the component seems not be painted.
Why this behaviour?
Thanks,
Massimiliano

Your immediate problem can be solved by making two changes:
a) your component has no initial size:
setSize(25, 50); // this is new
setOpaque(true);
setVisible(true); // not requiredb) use setLocation() to reposition the component
setLocation(xStart, 160);
//repaint(); // not required since changing the location will cause a repaintHowever the code still has many areas of concern.
For example, after the component has stopped moving, resize the frame. Notice how the component jumps to the top and middle of the frame? This is because by default a JPanel uses a LayoutManager. When you resize the frame the LayoutManager is invoked and the component is positioned based on the rules of the LayoutManager.
So, you need to read the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html]Using Layout Manager to understand the difference between using a Layout Manager and using "Absolute Positioning" (which is what you are attempting to do).
You should not be altering the "size" or "location" of the component in the paintComponent() method (ie. get rid of the setBounds()). These changes should be done externally as we did by using the setLocation(..) method.
When you fill the rectangle you should just use getSize().width and getSize().height, instead of your hard coded variables. Then you can dynamically change the size of your component by using the setSize() method.
The size of the component should not be hard coded. Once you've made the above change you can simply do:
MyComponent component = new MyComponent();
component.setSize(25, 50);

Similar Messages

  • Doubt about generic method

    i have a generic method has shown below
    public static <E extends Number> <E>process(E list){
    List<Interger> output = new ArrayList<Interger>(); or List<Number> output = new ArrayList<Number>();
    return output ;
    if delcare the output variable using Interger or Number . when i am returning the output . it is showing me compiler error and it suggests me to add cast List<E>. Why i not able understand. please clarify my doubt.
    Thanks
    Sura.Maruthi
    Edited by: sura.maruthi on Sep 21, 2008 9:48 PM

    Your method declaration is garbled; there can be only one <...> clause, eg
    public static <E extends Number> E process(E list);This declaration says that for any subclass E of Number, the method process takes a single E instance (called list!?) and returns a single E instance. A valid implementation would be
    return list;I'm guessing you want the parameter to have type List<E>?. Like this:
    public static <E extends Number> E process(List<E> list);This declaration says that for any subclass E of Number, the method process takes a list of E's and returns a single E instance. A valid implementation would be
    return list.get(0);Or perhaps you also want to return a list of numbers?
    public static <E extends Number> List<E> process(List<E> list);This declaration says that for any subclass E of Number, the method process takes a list of E's and returns another list of E's. A valid implementation would be
    return list;Note that you cannot just return a list of Integers or Floats, because your generic method must work for any subclass of Number, and you're promising to return back a list of the same type as the argument passed in.
    Edited by: nygaard on Sep 22, 2008 10:05 AM

  • Doubt: About synchronized methods?

    Hi,
    Can any one let me know, Is there any difference between static and non-static synchronized methods? If yes, what is the difference?

    One is static and one isn't. What did you think?
    As I recall, non-static methods lock on the object, whereas static methods lock on the class object, if that's what you're wondering about.

  • Doubt about dispose() method of JDialog

    Hi guys,
    Consider the following code:
              MyDialog dialog = new MyDialog(parent);
              dialog.setVisible(true);
                    // may the dialog was disposed before the following line gets executed
              dialog.getVariableValue();
              dialog.dispose();Suppose the MyDialog extends JDialog and have a member variable which can be accessed by getVariableValue() method.
    A dialog appears, enter something which is stored by a member variable of the MyDialog class. Then close the dialog by invoking dispose() method. After the dialog disappears, the next line dialog.getVariableValue() can get the entered value.
    I thought that the dialog will be null after dispose() gets called, but actually not.
    Is the current thread stopped at the line dialog.setVisible(true) and wait for the dialog to be closed?
    Can anyone explain?

    depends if you are to check isDisplayable() after myContainer = nullbut my output would be still
    run:
    100
    LoopsNo1
    There is JFrame
    LoopsNo2
    There is JFrame
    LoopsNo3
    There is JFrame
    LoopsNo4
    There is JFrame
    System Exit
    100
    100
    100
    100
    100
    100
    BUILD SUCCESSFUL (total time: 13 seconds)from code
    import java.awt.Dialog;
    import java.awt.Frame;
    import java.awt.Window;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.Action;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JWindow;
    import javax.swing.SwingUtilities;
    public class WindowGCDemo {
        private javax.swing.Timer timer = null;
        private int count = 0;
        public WindowGCDemo() {
            JFrame myFrame = new JFrame();
            for (int i = 0; i < 99; i++) {
                JWindow jWindow = new JWindow(myFrame);
                jWindow.setSize(200, 400);
                jWindow.setVisible(true);
                //jWindow = null;
            start();
            System.out.println(JWindow.getWindows().length); // prints 100
        private void start() {
            timer = new javax.swing.Timer(3000, updateCol());
            timer.start();
        private void startAgain() {
            timer = new javax.swing.Timer(3000, updateColAgain());
            timer.start();
        public Action updateCol() {
            return new AbstractAction("Set Delay") {
                private static final long serialVersionUID = 1L;
                @Override
                public void actionPerformed(ActionEvent e) {
                    timer.stop();
                    Window[] wins = Window.getWindows();
                    for (int i = 0; i < wins.length; i++) {
                        if (wins[i] instanceof JWindow) {
                            wins.setVisible(false);
    wins[i].dispose();
    wins[i] = null;
    System.gc();
    count++;
    startAgain();
    public Action updateColAgain() {
    return new AbstractAction("Set Delay") {
    private static final long serialVersionUID = 1L;
    @Override
    public void actionPerformed(ActionEvent e) {
    System.out.println("LoopsNo" + count);
    Window[] wins = Window.getWindows();
    for (int i = 0; i < wins.length; i++) {
    if (wins[i] instanceof JWindow) {
    } else if (wins[i] instanceof JFrame) {
    System.out.println("There is JFrame");
    } else if (wins[i] instanceof JDialog) {
    System.out.println("There is JFrame");
    } else if (wins[i] instanceof JWindow) {
    System.out.println("There is JWindow");
    wins[i].setVisible(true);
    } else {
    System.out.println("There is something else");
    count++;
    startAgain();
    if (count > 4) {
    timer.stop();
    stop();
    private void stop() {
    System.out.println("--------------------------------------------");
    System.out.println("System Exit");
    System.out.println(JFrame.getWindows().length);
    System.out.println(JDialog.getWindows().length);
    System.out.println(JWindow.getWindows().length);
    System.out.println(Frame.getWindows().length);
    System.out.println(Dialog.getWindows().length);
    System.out.println(Window.getWindows().length);
    System.exit(0);
    public static void main(String[] args) {
    SwingUtilities.invokeLater(new Runnable() {
    @Override
    public void run() {
    WindowGCDemo windowGCDemo = new WindowGCDemo();
    }Edited by: mKorbel on 18.9.2011 23:30 typos                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • A question about a method with generic bounded type parameter

    Hello everybody,
    Sorry, if I ask a question which seems basic, but
    I'm new to generic types. My problem is about a method
    with a bounded type parameter. Consider the following
    situation:
    abstract class A{     }
    class B extends A{     }
    abstract class C
         public abstract <T extends A>  T  someMethod();
    public class Test extends C
         public <T extends A>  T  someMethod()
              return new B();
    }What I want to do inside the method someMethod in the class Test, is to
    return an instance of the class B.
    Normally, I'm supposed to be able to do that, because an instance of
    B is also an instance of A (because B extends A).
    However I cannot compile this program, and here is the error message:
    Test.java:16: incompatible types
    found   : B
    required: T
                    return new B();
                           ^
    1 errorany idea?
    many thanks,

    Hello again,
    First of all, thank you very much for all the answers. After I posted the comment, I worked on the program
    and I understood that in fact, as spoon_ says the only returned value can be null.
    I'm agree that I asked you a very strange (and a bit stupid) question. Actually, during recent months,
    I have been working with cryptography API Core in Java. I understood that there are classes and
    interfaces for defining keys and key factories specification, such as KeySpec (interface) and
    KeyFactorySpi (abstract class). I wanted to have some experience with these classes in order to
    understand them better. So I created a class implementing the interface KeySpec, following by a
    corresponding Key subclass (with some XOR algorithm that I defined myself) and everything was
    compiled (JDK 1.6) and worked perfectly. Except that, when I wanted to implement a factory spi
    for my classes, I saw for the first time this strange method header:
    protected abstract <T extends KeySpec> T engineGetKeySpec
    (Key key, Class<T> keySpec) throws InvalidKeySpecExceptionThat's why yesterday, I gave you a similar example with the classes A, B, ...
    in order to not to open a complicated security discussion but just to explain the ambiguous
    part for me, that is, the use of T generic parameter.
    The abstract class KeyFactorySpi was defined by Sun Microsystem, in order to give to security
    providers, the possibility to implement cryptography services and algorithms according to a given
    RFC (or whatever technical document). The methods in this class are invoked inside the
    KeyFactory class (If you have installed the JDK sources provided by Sun, You can
    verify this, by looking the source code of the KeyFactory class.) So here the T parameter is a
    key specification, that is, a class that implements the interface KeySpec and this class is often
    defined by the provider and not Sun.
    stefan.schulz wrote:
    >
    If you define the method to return some bound T that extends A, you cannot
    return a B, because T would be declared externally at invocation time.
    The definition of T as is does not make sense at all.>
    He is absolutely right about that, but the problem is, as I said, here we are
    talking about the implementation and not the invocation. The implementation is done
    by the provider whereas the invocation is done by Sun in the class KeyFactory.
    So there are completely separated.
    Therefore I wonder, how a provider can finally impelment this method??
    Besides, dannyyates wrote
    >
    Find whoever wrote the signature and shoot them. Then rewrite their code.
    Actually, before you shoot them, ask them what they were trying to achieve that
    is different from my first suggestion!
    >
    As I said, I didn't choose this method header and I'm completely agree
    with your suggestion, the following method header will do the job very well
    protected abstract KeySpec engineGetKeySpec (Key key, KeySpec key_spec)
    throws InvalidKeySpecException and personally I don't see any interest in using a generic bounded parameter T
    in this method header definition.
    Once agin, thanks a lot for the answers.

  • Doubt about  a null value assigned to a String variable

    Hi,
    I have a doubt about a behavior when assigning a null value to a string variable and then seeing the output, the code is the next one:
    public static void main(String[] args) {
            String total = null;
            System.out.println(total);
            total = total+"one";
            System.out.println(total);
    }the doubt comes when i see the output, the output i get is this:
    null
    nulloneA variable with null value means it does not contains a reference to an object in memory, so the question is why the null is printed when i concatenate the total variable which has a null value with the string "one".
    Is the null value converted to string ??
    Please clarify
    Regards and thanks!
    Carlos

    null is a keyword to inform compiler that the reference contain nothingNo. 'null' is not a keyword, it is a literal. Beyond that the compiler doesn't care. It has a runtime value as well.
    total contains null value means it does not have memory,No, it means it refers to nothing, as opposed to referring to an object.
    for representation purpose it contain "null"No. println(String) has special behaviour if the argument is null. This is documented and has already been described above. Your handwaving about 'for representation purpose' is meaningless. The compiler and the JVM don't know the purpose of the code.
    e.g. this keyword shows a hash value instead of memory addressNo it doesn't: it depends entirely on the actual class of the object referred to by 'this', and specifically what its toString() method does.
    similarly "total" maps null as a literal.Completely meaningless. "total" doesn't 'map' anything, it is just a literal. The behaviour you describe is a property of the string concatenation operator, not of string literals.
    I hope you can understand this.Nobody could understand it. It is compete nonsense. The correct answer has already been given. Please read the thread before you contribute.

  • Doubt about uses of OBIEE

    I have some doubts about the possible uses of OBIEE. It happens that using OBIEE sometimes users demand report of an "analytical" type, that is aggregated analysis through OBIEE’s Answers, selecting data from dimension tables and measures from fact tables. That’s the ordinary purpose of business intelligence tools!!!
    Some other times though, users demand to perform through Answers analyses of an "operating" type, that is simple extractions of some fields belonging to dimension tables, linked between each other through joins, (hence without querying fact tables): that happens because some of the tables brought in the datawarehouse are not directly linked to any fact table. In this way users want to use Answers to visualize data even for this kind of extractions (or operating reports).
    Is this a correct use of the tool or is it just a “twisted” way of using it, always leading eventually to incorrect extractions? If that’s the case, is it possible to use instead BI Publisher, extracting the dataset through the "Sql Query" mode in a visual manner? The problem of the latter solution, in my case, relies in the fact that users are not enough skilled from the technical point of view: they would prefer to use Answers for every extraction, belonging both to the first type (aggregations) and the second one (extractions), that I just described. Can you suggest a methodology to clarify this situation?

    Hi,
    I understand your point... But I think OBIEE doesn't allow having dimension "on their own", they must be joined to a fact table somehow. This way, when you do a query in answers using fields of two dimension tables a fact table should be always involved. When dimensions are conformed, several fact tables may be used, and OBIEE uses the "best" one in terms of performance. However, there are some tricks that you can do to make sure a particular fact table is used, like using the "implicit fact column" in the presentation layer.
    So back to your point, using OBIEE for "operational" reporting as you call it is a valid option in my experience, but you have to make sure that the underlaying star schema supports the logic that your end users expect when they use just dimension fields.
    Regards,

  • Doubt about Tunning View Objects

    Hi !. I have the following doubt about tunning View Objects:
    If I have the following configuration on a VO:
    All Rows
    In Batches Of: 11
    As Needed
    Access Mode: Scrollable
    Range Size: 10
    Total Records On The Table: More than 100
    What would happen is that while the initial render, the view cache is fetch with 11 rows from the table and the ui table shows 10. In subsequent scroll events, more queries again will be done but not when the user scrolls back. My doubt is this one: Why, while the initial render If I put a breakpoint in this overrided method executeQueryForCollection, the execution reachs there but in subsequent scroll events (forward) the execution doesn't reach there ?. I understand thast this should happen as the required rows are not yet in the cache. I would like to know a way to test this access mode and what method is executed in every roundtrip to the DB. Thankx !.

    I don't think ADF needs to execute the query again - it just needs to fetch the next set of records.
    So if the cursor is already open, no need to issue another query.
    You can use the HTTP Analyzer to watch network traffic
    Monitoring ADF Pages Round-Trips with the HTTP Analyzer
    And you can use the logging features of ADF to see the queries being executed.
    Declarative View Objects (VOs) for better ADF performance

  • Doubt about @SequenceGenerator annotation (sequenceName element)

    Hello, everybody!
    I'm with a doubt about the @SequenceGenerator annotation. What is that sequenceName element? Is that a stored procedure in the database that we have to create or what? If we specify it, what do we have to create in the database? If we don't specify the sequenceName element, will the sequence be generated for us?
    Thank you in advance.
    Marcos

    B.Mansour Nizar wrote:
    no i don't want to remove the @GeneratedValue but instead just bypass it just in that case only to gain peformanceEither you bypass JPA altogether for the task and then manually update the sequances afterwards or, if you are using hibernate, you implement a custom Idgenerator that can use a provided ID.
    The implementation involves extending IdentityGenerator and ovveriding the generate method to return super.generate if the entity Id is null and return the supplied entity's Id otherwise. You then set that generator for that entity.

  • DOUBT ABOUT MASTER DATA

    Hey guys!!!
    I have a doubt about master data, i need to add an atribute to a master data characteristic, do i have to erase the data to do this or can i add the atribute without erase the data?
    Thanks and Regards!!

    >
    Koundinya Karanam wrote:
    > Hi,
    > You should delete the Master data with SID's first before adding the attribute to that characteristic.
    >
    > Regards,
    > KK.
    KK,
    Thats not true.
    You neednot delete master data to add attributes to a characteristic.
    Additionally, you cannot delete (there are methods to delete which are not suggested) master data in normal way, if there is transactional data for that characteristic.
    Luis,
    You should be able to add attribute to a characteristic without deleting master data, but make sure you load data for the same for values to reflect.

  • Doubt about scope of instance variable

    Hi All,
    i have a doubt about scope of instance variable.
    if i declare a instance variable in servlet , i want to know whether it can be shared(means everywhere ) or not.
    thanks in advance
    Gopal

    The servlet container will create one servlet object, and run multiple threads through its service() / doGet() / doPost() methods.
    That means that any instance variables of the servlet are shared between multiple requests, and can cause problems with threads accessing the same variable..
    To make your servlets thread-safe
    1 - have no instance variables - only use local variables in the doGet/doPost method.
    2 - use the session scope for storing variables you need over multiple calls.
    Cheers,
    evnafets

  • Doubt about string.intern()

    Hello
    I have a doubt about string.intern() method.
    The document says
    When the intern method is invoked, if the pool already contains a string equal to this String object as determined by the String.equals(Object) method, then the string from the pool is returned.
    So what is the point of using this intern() method with == or != operators if it aleady calling to equals method internally?
    eg:
    if (studentObject.getName().intern() == "Student Name") {}cannot be better than
    if (studentObject.getName().equals("Student Name")) {}Can someone please explain?

    Easy dude.
    >
    Why do you need to optimize it?>
    Because i want to.
    I would avoid the whole stupid 100 line if-else by doing a Map of type->object and then just clone() the object. But maybe that might not be suitable or "fast enough" for you.I cannot do above because object have it's own behaviors varying at run time
    eg - class One has setOne method and class hundred has setHundred method
    . Even if i use a map and clone it again i have to use above comparison for setting those behaviours.
    Explain your actual problem you're trying to solve, with actual cases. What are these "one" and "Hundred" classes really? Or is your project so top secret that you can't tell us?It is not secret but big. And I need to make the question understandable. If I post the whole code no one will looking at it.
    Now you asking so please have a look.
    still I have cleaned up many.
    My initial question was how to bit speed up the comparison? And can't i use intern() Because here if I got plenty of rectangles(it is the last) performace sucks.
    for (CObject aObject : objList) {
                if (aObject.getType().equals(SConstant.TEMPLATE)) { /* process Template */
                    Template tObj = (Template) aObject;
                    org.apache.velocity.Template template = VelocityTemplateManager.getInstance().getObjectTemplateFromFile(retemplateProperties.getProperty("PAGE"));
                    VelocityContext context = new VelocityContext();
                    StringWriter writer = new StringWriter();
                    context.put(retemplateProperties.getProperty("BAND_OBJECT"), dtmBand);
                    tObj.setTags(writer.toString());
                } else if (aObject.getType().equals(SConstant.LINE)
                        && !isInBandandBandAutoAdjust(aObject)) {
                    Line object = (Line) aObject;
                    org.apache.velocity.Template template = VelocityTemplateManager.getInstance().getObjectTemplateFromFile(retemplateProperties.getProperty("LINE"));
                    VelocityContext context = new VelocityContext();
                    StringWriter writer = new StringWriter();
                    updateContextWithCheckShifting(context, object);
                    context.put(retemplateProperties.getProperty("LINE_OBJECT"), object);
                    template.merge(context, writer);
                    object.setTags(writer.toString());
                } else if (aObject.getType().equals(SConstant.IMAGE) /* process Image */
                        && !isInBandandBandAutoAdjust(aObject)) {
                    REImage imageObject = (REImage) aObject;
                    org.apache.velocity.Template template = VelocityTemplateManager.getInstance().getObjectTemplateFromFile(retemplateProperties.getProperty("IMAGE"));
                    VelocityContext context = new VelocityContext();
                    updateContextWithCheckShifting(context, imageObject);
                    context.put(retemplateProperties.getProperty("IMAGE_OBJECT"), imageObject);
                    mageObject.setTags(writer.toString());
                   else if (aObject.getType().equals(SConstant.RECTANGLE) /* process Rectangle */
                        && !isInBandandBandAutoAdjust(aObject)) {
                    Rectangle rectangleObject = (Rectangle) aObject;
                    org.apache.velocity.Template template = VelocityTemplateManager.getInstance().getObjectTemplateFromFile(retemplateProperties.getProperty("RECTANGLE"));
                    VelocityContext context = new VelocityContext();
                    StringWriter writer = new StringWriter();
                    updateContextWithCheckShifting(context, rectangleObject);
                    context.put(retemplateProperties.getProperty("RECTANGLE_OBJECT"), rectangleObject);
                    template.merge(context, writer);
                    rectangleObject.setTags(writer.toString());
                }And masijade
    Thank you very much for the better explanation.

  • Doubt about preferred or available service.

    I have a doubt about preferred or available service.
    I have a Oracle RAC with 3 nodes.
    I created a service GL, but I didn't setup available instance, only preferred instances with 2 instances (PROD1,PROD2)
    srvctl add service -d PROD -s GL -r PROD1,PROD2
    My doubt is:
    If PROD1 instance dies, I would like to know if rac01 is restored automatically on rac02.
    Anybody can help me?
    Thanks in advance.
    Leonardo.

    There are different ways for configure failover... below just an example :
    mydatabase.us.com =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.100.124.91)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.100.124.93)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.100.124.95)(PORT = 1521))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = mydatabase.us.com)
    (FAILOVER_MODE =
    (TYPE = SELECT)
    (METHOD = BASIC)
    (RETRIES = 180)
    (DELAY = 5)
    Or... read the document :
    http://docs.oracle.com/cd/B19306_01/network.102/b14213/tnsnames.htm
    Regards,
    Alex Alvarenga.

  • A technical question about time.

    I find myself wondering what would be the total playing time of my iTunes library. How can I determine this? I could copy the total file into Excel then add up the time column, but as I have 12,000 tracks I doubt Excel could handle it. Is there a simple way to do this?

    Select Library - Music and look at the botton center of the iTunes window.
    Click it to change the displayed info.
    A technical question about time.
    T=2π √L/G

  • Doubts about some popular function modules?

    Hi all,
    I have doubts about these function modules (see in parenthesis)
    ws_filename_get (to get the file name at ...?)
    ws_query (to get file size and environment variables from the presentation server to the ...?)
    upload and download (what are the new function modules used in place of these (I know they are obsolete now)
    what is the Object oriented equivalents of these functions?
    Thanks.
    Charles.
    ++++++++++++++++++++++++++++++++++++

    <i>(1)What is the use of ws_filename_get? Please be specific in your answer, about where the file resides: application server, presentation server or the ABAP program.</i>
    It is simply providing an interface for the user to choose a filename which resides on the frontend PC(presentation server). As suggested already, this has been replaced with FILE_OPEN_DIALOG method of the class CL_GUI_FRONTEND_SERVICES.
    <i>2)What is the use of ws_query? Please be specific in your answer, about where the file resides: application server, presentation server or the ABAP program.</i>
    Again, already answered,  this has been replace by multiple more specific methods of the same class mentioned above.
    <i>How can GUI_UPLOAD be a substitute of Upload? It is a substitute of WS_UPLOAD as upload is used to transfer data from presentation server to the ABAP program, whereas the other two are used to get it from presentation server to the application server.</i>
    They all transafer data from the presentation to your application.  They are all interchangable(in a sense), but you should be using the GUI_UPLOAD method of the class CL_GUI_FRONTEND_SERVICES.
    Regards
    Rich Heilman

Maybe you are looking for