JDeveloper Problem with GUI

Hi All,
I'm running JDev 3.1 on Win2000, and I'm having a bit of a problem with redraws of the GUI.
When I click anywhere on the JDev GUI and trigger and action that involves a GUI redraw the little piece of the GUI under the mouse pointer graphic is not redrawn. It does not effect the functionality but it is annoying and will make the other developers I work with less keen about using it.
Does anyone else have this problem? Is it a JDev or Win2k problem?
Cheers
d

Probably an issue with the JRE used by JDev. on Win 2k. Have you tried 3.2x? I haven't seen that type of issue with it on Win 2k.

Similar Messages

  • Problem with GUI in applet

    Hai to all,
    I am having a problem with GUI in applets
    My first class extends a JPanel named A_a
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    public class A_a extends JPanel
    JButton jb;
    JTextArea text;
    public A_a()
    setLayout(new FlowLayout());
    jb=new JButton("Click me");
    //add(jb);
    text=new JTextArea(5,20);
    add(text);
    public void text_appendText(String aa)
    System.out.println("I AM IN A_a");
    text.append(aa);
    text.revalidate();
    revalidate();
    /*public static void main(String ags[])
    A_a a = new A_a();
    JFrame frame=new JFrame();
    frame.getContentPane().add(a);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    frame.setSize(200,200);
    frame.show();
    and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class B_b extends JApplet
    public A_a a;
    public void init()
    a=new A_a();
    getContentPane().add(a);
    public void text_appendText(String aa)
    final String aaa =aa;
    new Thread(new Runnable()
    public void run()
    a=new A_a();
    a.setBackground(new java.awt.Color(255,200,200));
    System.out.println("I AM IN B_b");
    a.text.append(aaa);
    a.text.revalidate();
    getContentPane().remove(a);
    resize(500,500);
    }).start();
    and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class C_c extends JApplet implements ActionListener
    JButton jbt;
    JTextArea jta;
    public void init()
    getContentPane().setLayout(new FlowLayout());
    jbt=new JButton("Click me");
    jbt.addActionListener(this);
    getContentPane().add(jbt);
    jta=new JTextArea(5,20);
    getContentPane().add(jta);
    public void actionPerformed(ActionEvent ae)
    Enumeration e = getAppletContext().getApplets();
    Applet applets = null;
    while(e.hasMoreElements())
    applets=(Applet)e.nextElement();
    if ( applets instanceof B_b)
    System.out.println("I AM CLASS C_c");
    ((B_b)applets).text_appendText(jta.getText());
    ((B_b)applets).remove());
    ((B_b)applets).getContentPane().add(D_d);
    both the applets C_c and B_b are in same browser page
    How can i achive that pls help .

    Just to make the code readable...
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    public class A_a extends JPanel
    JButton jb;
    JTextArea text;
    public A_a()
    setLayout(new FlowLayout());
    jb=new JButton("Click me");
    //add(jb);
    text=new JTextArea(5,20);
    add(text);
    public void text_appendText(String aa)
    System.out.println("I AM IN A_a");
    text.append(aa);
    text.revalidate();
    revalidate();
    /*public static void main(String ags[])
    A_a a = new A_a();
    JFrame frame=new JFrame();
    frame.getContentPane().add(a);
    frame.pack();
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) { System.exit(0); }
    frame.setSize(200,200);
    frame.show();
    }and then I am using other class B_b which is an applet carries a exitsing panel (A_a) inside it .
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class B_b extends JApplet
    public A_a a;
    public void init()
    a=new A_a();
    getContentPane().add(a);
    public void text_appendText(String aa)
    final String aaa =aa;
    new Thread(new Runnable()
    public void run()
    a=new A_a();
    a.setBackground(new java.awt.Color(255,200,200));
    System.out.println("I AM IN B_b");
    a.text.append(aaa);
    a.text.revalidate();
    getContentPane().remove(a);
    resize(500,500);
    }).start();
    }and the I am using the second applet C_c in which by performing a button action the old panel A_a should get removed and replace the new panel D_a (which is not here )in the applet B_b with all other components(namely button , text fields etc)
    import javax.swing .*;
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.util.*;
    public class C_c extends JApplet implements ActionListener
    JButton jbt;
    JTextArea jta;
    public void init()
    getContentPane().setLayout(new FlowLayout());
    jbt=new JButton("Click me");
    jbt.addActionListener(this);
    getContentPane().add(jbt);
    jta=new JTextArea(5,20);
    getContentPane().add(jta);
    public void actionPerformed(ActionEvent ae)
    Enumeration e = getAppletContext().getApplets();
    Applet applets = null;
    while(e.hasMoreElements())
    applets=(Applet)e.nextElement();
    if ( applets instanceof B_b)
    System.out.println("I AM CLASS C_c");
    ((B_b)applets).text_appendText(jta.getText());
    ((B_b)applets).remove());
    ((B_b)applets).getContentPane().add(D_d);
    }

  • Design Problem with GUI sub vi

    Hello community,
    in general, I would like to separate the GUI from the data, but I get
    a problem with this design approach in LabView:
    I often have sub VIs that are supposed to control something.
    Therefore, these VIs consist of a control loop. A GUI window should
    show the regulation process (showing how the tracking error is
    hopefully approaching zero etc.). As I said, this GUI should be a
    separate VI (separate from the control loop VI). Since the GUI has to
    be updated on each sample, it is clear that the GUI VI should be
    inside the control loop, and therefore, it should be a sub VI of the
    control loop VI.
    Now, the problem is that the control loop VI itsself is a sub VI
    because the whole regulation is just a subsystem of the whole program
    (The main VI doesn't have a GUI, but first starts a (GUI) input mask
    for the same reason: separate the GUI from the rest).
    But back to the GUI VI inside the control loop. I must check the 'Show
    Front Panel When Called' option. But I can't check the 'Close
    Afterwards if Originally Closed' option since the GUI VI would appear
    and disappear in the control loop - according to the loop's sample
    rate. However, if I don't check the 'Close Afterwards if Originally
    Closed' option then the GUI VI will continue to show, even after the
    control process is finished.
    So in other words: I need the possiblity to close the GUI VI
    programatically, after the control process is finished.
    Any ideas?
    Regards
    Johannes

    Hi tmh,
    thanks for your answer
    On Tue, 11 Nov 2003 10:26:32 -0600 (CST), tmh wrote:
    >I think you're on the wrong track trying to put your 'GUI VI' inside
    >your control loop. It might be a better design to have the control and
    >GUI handled by separate loops and use an appropriate method to pass
    >data between the two, e.g. a global variable to pass the setpoint from
    >GUI to control...
    I try to avoid globals. Now, suppose I had multiple unrelated control
    loops. I had to suppose a global variable for each of these
    subsystems. I already use globals for the GPIB device IDs. I wouldn't
    like more.
    >and a queue to pass readings from control to GUI. In
    >fact, you could even split the GUI into two loops: one to read user
    >input from the front pa
    nel controls and one to display data returned
    >by the control loop.
    But if I split the GUI: How can I view them simultaneously? The user
    must see input and output simultaneously, in one window.
    >You may find it's more convenient to make the GUI
    >the top-level VI and make the control loop a subVI of that (but
    >outside the GUI loops).
    Your approach sounds interesting. Is there a sample for this
    architecture in the examples?
    Anyway, I have to point out that I have several unrelated GUI windows
    in my application. There is no notion of a main GUI in my application.
    The control loop is just one feature of my application, so it doesn't
    make sense to use the control GUI as the top-level VI. At application
    startup a user input form is displayed (it also has some sort of menu
    selection). But even this window can't be toplevel since it provides
    an Option radio button (that shows and hides controls, accordingly) a
    CONTINUE button, and a STOP button which implies that the input
    form.vi must be
    in a loop.
    The problem is that I can't send messages to windows in LabView as I
    am used to in Win32/VC++.
    Johannes

  • JDeveloper problem with actions

    Hello
    I'm working on my first struts application and I have any problem with actions(I think).
    When I run the application, I don't see any data from DB on my page but when I click any of these 4 buttons, then the data load from DB.....Can anybody help me....I want to see my data when the page loads for the first time, not after the button click. Thanks a lot.
    (The buttons shows the rows of the table....first,previous,next,last)
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <html:form action="/zuctzaz.do" >
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <input type="hidden" name="<c:out value='${bindings.statetokenid}'/>" value="<c:out value='${bindings.statetoken}'/>" >
    <tr>
    <td>
    <table>
    <tr>
    <td>
    <table>
    <tr>
    <td><input type="submit" name="event_First" value="First" STYLE="width:35px" <c:out value="${bindings.First.enabledString}" /> ></td>
    <td><input type="submit" name="event_Previous" value="Prev" STYLE="width:35px" <c:out value="${bindings.Previous.enabledString}" /> ></td>
    <td><input type="submit" name="event_Next" value="Next" STYLE="width:35px" <c:out value="${bindings.Next.enabledString}" /> ></td>
    <td><input type="submit" name="event_Last" value="Last" STYLE="width:35px" <c:out value="${bindings.Last.enabledString}" /> ></td>
    </tr>
    </table>
    </td>
    <td>
    <table>
    <tr>
    <td colspan="3"><strong>Z�&#269;tovac� z�znam</strong></td>
    </tr>
    <tr>
    <td>Date</td>
    <td><input type="text" name="textfield1" value="<c:out value="${bindings['datZuct']}"/>"></td>
    <td><c:out value="${bindings['cisPdo']}"/> AND <c:out value="${bindings['zucZazn']}"/></td>
    </tr>
    <tr>
    <td>Place</td>
    <td colspan="2">Brusel</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </html:form>

    Hy Again!
    I forgot to say one more thing that could be relevant:
    If i add any action from the struts-config.xml in the provider for the <defaultAction> of the portlet it works correctly.
    So the actions work correctly, the problem is that when sending back to the oracle portal the request with the new action, there is no response.
    Pls help!
    Thanx, and best regards!
    Ado

  • BEx Analyzer 3.x language problem with GUI 710

    Hi All,
    We are having trouble to login to BEx Analyzer 3.x with GUI 710 with English language, even if we set language as EN in the logon pad by default it is logging into Japanese language. But 7.x Analyser is working fine.
    We have BI 7.0 and BW 3.5 systems. 
    SAP GUI 710 installed with latest available Frontend Patch ( bi710sp10_1000-10004472 , gui710_15-10002995 and bw350gui710_7-10004473 ) and we are using Excel 2003 on XP Professional.
    Installed .Net Framework 2.0, Microsoft office patch - office2003-KB907417
    Your help is very much appreciated.
    Regards,
    MKR

    Hi,
    Are you using different backend systems to connect for 3.x and 7.x? Because the file which prompts the SAP Logon is a common file used by both 3.x and 7.x.It shouldn't behave differently for the same system.
    You can uninstall the SAPGui and Front End patch and then reinstall it.
    The BW 3.5  patch  8  in SAP GUI 7.10 is released to the SMP now and is available for download.
    Rgds,
    Murali

  • Problem With GUI ( Who can help me! )

    Hallo,
    It�s a very simple program to See the Clock on a panel. The program works well, but if I want to include a GUI to my program, it don�t want. I use runable action and I think that is be the problem.
    Here below you can see the code�s. I�m sure there is someone who can help me.
    Thanks a lot,
    Seyyed
    The code:
    public class Clock_maken extends java.applet.Applet
    implements Runnable {
    public volatile Thread clockThread = null;
    JLabel           Datuum_label;
    DateFormat      formatter;
    Locale           locale;
    Date           currentDate;
    String          today;
    public void init(){ 
    locale = Locale.getDefault();
    Datuum_label = new JLabel("date");
    public void start() {       
    Datuum_label.setForeground(Color.black);
    add(Datuum_label);
    if(clockThread == null) {
    clockThread = new Thread(this);
    clockThread.start();
    public void run() {
         Thread myThread = Thread.currentThread();
         while (clockThread == myThread) {
         currentDate = new Date();
    formatter =                     DateFormat.getDateTimeInstance(DateFormat.FULL,
              DateFormat.MEDIUM, locale);
    today = formatter.format(currentDate);
    Datuum_label.setText(today);
    try {
    Thread.sleep(1000);
    } catch (InterruptedException e){ }
    public void stop() {clockThread = null;}
    public static void main(String[] args){
    JFrame.setDefaultLookAndFeelDecorated(true);
    JFrame      lunarPhasesFrame = new JFrame("Lunar Phases");
    lunarPhasesFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Clock_maken phases = new Clock_maken();
    phases.init();
    phases.start();
    lunarPhasesFrame.pack();
    lunarPhasesFrame.setVisible(true);
    Now i want to create a GUI like folowing, but it dont work. Do u know wat is de probleem of mijn prograam.
    private static void createAndShowGUI() {
    JFrame.setDefaultLookAndFeelDecorated(true);
         /*     JFrame      lunarPhasesFrame = new JFrame("Lunar Phases");
              lunarPhasesFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    */ Clock_maken phases = new Clock_maken();
         /*     phases.init();
              phases.start();
              lunarPhasesFrame.pack();
         lunarPhasesFrame.setVisible(true);*/
    public static void main(String[] args) {
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    }

    Continued here, with formatted code:
    http://forum.java.sun.com/thread.jspa?threadID=725022

  • JDeveloper - problems with Tutorial for Java EE Developers

    Hi,
    I am trying to start learning Oracle J2EE technologies, and I am using the Oracle "Tutorial for Java EE Developers (10.1.3.1.0)" listed in the Oracle Application Server 10g (10.1.3) page: http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html.
    I am having problems in chapter 2, at the creating EJB 3.0 Persistence Entities stage, when using the Create Entities from Tables Wizard. Basically, when I select all the tables from the SRDEMO schema and attempt to create the Java classes, only the first table objects are created - ExpertiseAreas.java and ExpertiseAreasPK.java. I do not get any error messages, so I am not sure why the other table objects are not created.
    If I then use the Wizard to select tables individually, the objects are created. However, they appear to be missing some details - specifically the @OneToMany annotation.
    Has anyone encountered this same issue, or are there any known issues with this tutorial.
    I am using version 10.1.3.4 of JDeveloper, on a 10g (10.2) XE database. I installed the version of JDeveloper without JDK included. I have a Sun Java EE 5 SDK Udate 5 (JDK 6u7) install of JDK.
    Thanks,
    Fraser

    Please refer
    http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_ejb_30/ejb_30.htm
    http://www.oracle.com/technology/tech/java/oc4j/ejb3/howtos/howtoejb30mappingannotations/doc/how-to-ejb30-mapping-annotations.html#onetomany

  • Please help problem with GUI

    Hi
    I have two problems firstly when i try to assign a method to a button to a GUI
         JButton SetPrice = new JButton ("Set Price");
            contentPane.add( SetPrice);
             SetPrice.addActionListener(new ActionListener() {
                                   public void actionPerformed(ActionEvent e) {  SetPrice ();    }This is teh code i am using to set up teh button on teh display.Belwo is the method it should run.
    public double SetPrice( int price)
             if (price <= 199.9){
           Cost= price;
             return Cost;
            else {
              System.out.println ( "Set a price which is less than 199.9");
              return Cost; }
            }When i try to compile it comes up with when i comipile
    SetPrice (int) in Shop cannot be applied to ()The variable has type double.So pelase my someone show me how to make the action listener button run this method.
    Thanks

    JButton SetPrice = new JButton ("Set Price");
            contentPane.add( SetPrice);
             SetPrice.addActionListener(this);
    SetPrice.setActionCommand("setprice");
    public void actionPerformed(ActionEvent e) {
    String action=e.getActionCommand();
    if(action.equals("setprice") {
    //do something
        }

  • SOS Problem with GUI login

    Please answer me as fast as you can because I have the following serious problem:
    I had install the SAP WEB AS 6.10 (and SAPDB) test version which I took it from the book ABAP OPJECTS THE OFFICIAL REFERENCE. Unfortunatelly, it did not work well when I was off line of the network of my company, I also installed the network adapter of MS LOOPBACK (as the instructions are saying) but again I couldn't login, so I uninstall from my PC the SAP WEB AS. Next day when I went to my company I could not logon to SAP and the error message is: SERVICE 'SAPDP00' UNKNOWN. I check the fileservice which is under the directory C:\WINNT\SYSTEM32\DRIVERS\ETC and there is a line with SAPDP00 3200/tcp. I reinstall GUI 7 times but the problem still exists.
    Well I hope that I will find a solution during weekend because if not I will forced to format my pc and reinstall all my aplication, sth which is very painfull.
    My pc is working with WinXP SP1.
    The error details are:
    service 'sapdp00' unknown
    time: Sat Jul 03 10:51:16 2004
    component: NI(Network Interface)
    release: 620
    version: 36
    module: ninti.c
    line: 428
    method: NiPServToNo
    return code:  -3
    System Call: getservbyname
    counter: 1
    Message was edited by: s0003198291

    Finally I found what cause this problem and the temporary solution plus the permanent one.
    My PC was hit by a virus (new version of QHOSTS-1 see at the end) which is changing the registry file HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
    "DatabasePath"= %SystemRoot%\nsdb
    So it is creating a host file under C:\WINNT\NSDB which it put it to the registry.
    So the permanent solution is to change the Registry.
    The temporary one is to run the following command from the dos:
       sapgui /H/<address of the SAP server>/S/3200.
    You can find more information on:
    http://www.sapfans.com/forums/viewtopic.php?t=83386&highlight=servicesapdp00unknown
      Information about the virus you can find in:
    http://vil.nai.com/vil/content/v_100719.htm
       Thanks

  • Having problems with GUI

    Goodday all, I'm having a problem getting this GUI for a simulation game up and running. I've added four panels which each house components for instance buttons, text area etc. And I've created another panel to house the image that should be set for the background. I've heard that the best way to achieve this is to use getLayeredPane(), but I think that's the problem. The panel simDisplay holds the title for the simulation, simControls hold start and stop simulation buttons, simGrid holds a grid on which the simulation is played (still working on that) and simDisplayControls is a panel that holds a textArea and button to run the simulation again. The textArea is a display area for the status of the simulation (for instance which characters moved, how many are there remaining etc ). The simDisplay was placed NORTH, simGRID CENTER, simControls EAST, and simDisplayContols SOUTH. Before I added the getLayeredPane so that I can view the image as the background, each of these panels were in their respective positions within the layout...now that I have, only some components are visible. As soon as I comment out that line of code with getLayeredPane all the components show exactly how I want them to which is in the positions I specified above (NORTH, SOUTH etc). I'm wondering if the fact that I used the BoxLayout to position the components within their panels is conflicting with the layeredPane. I'm new to this so any help will be greatly appreciated. Thank You ;)
    import javax.swing.*;
    import java.awt.*;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Image;
    public class Simulation extends JFrame{
    //create new panels, image icons and buttons
    JLayeredPane panel = new JLayeredPane();
    JPanel panel2 = new JPanel();
    JPanel simDisplayControls = new JPanel();
    public JButton start = new JButton("Start Simulation");
    public JButton stop = new JButton("Stop Simulation");
    private JTextArea turnDisplay;
    public JButton next = new JButton("Next Time Step");
    JPanel simDisplay = new JPanel();
    JPanel simGrid = new JPanel ();
    JPanel simControls = new JPanel();
    //GUI main function
    public static void main(String[] args){
    Simulation example = new Simulation();
    //GUI constructor
    public Simulation() {
    BorderLayout b = new BorderLayout();
    setLayout(b);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    BorderLayout panelout = new BorderLayout( 0, 0 );
    panel.setLayout(panelout);
    //Set image as simulation background
    ImageIcon myIcon = new ImageIcon("background2.jpg");
    JLabel picLabel = new JLabel(myIcon);
    panel2.add(picLabel);
    picLabel.setBounds(0, 0, myIcon.getIconWidth(), myIcon.getIconHeight());
    getLayeredPane().add(picLabel, new Integer.MIN_VALUE);
    panel.setOpaque(false);
    //set content pane to main panel containing all other panels
    setContentPane(panel);
    simGrid.setLayout (new GridLayout (20, 20));
    // create text area to display status after each time step of the simulation
    turnDisplay = new JTextArea("Doodlebug Turn", 10, 40);
    JScrollPane scrollingDisplay = new JScrollPane(turnDisplay);
    simDisplayControls.add(scrollingDisplay);
    turnDisplay.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
    //create horizontal box to house status display and "next time step" button
    Box simDisplayBox = Box.createHorizontalBox();
    simDisplayBox.add(Box.createHorizontalGlue());
    simDisplayBox.add(turnDisplay);
    simDisplayBox.add(Box.createHorizontalStrut(40));
    simDisplayBox.add(next);
    simDisplayBox.add(Box.createHorizontalStrut(30));
    //create vertical box to house "start" and "stop" simulation buttons
    Box simControlBox = Box.createVerticalBox();
    simControlBox.add(Box.createVerticalStrut(80));
    simControlBox.add(start);
    simControlBox.add(Box.createVerticalStrut(60));
    simControlBox.add(stop);
    simControlBox.add(Box.createVerticalGlue());
    //create label containing the title of the simulation
    JLabel title = new JLabel("Sim Title");
    //add title label and box containing simulation control buttons to their respective panels
    simDisplay.add(title);
    simControls.add(simControlBox);
    //add box containing status display and "next time step" button to its coresponding panel
    simDisplayControls.add(simDisplayBox);
    //add panels to the main panel
    panel.add(simDisplay, BorderLayout.NORTH);
    panel.add(simGrid, BorderLayout.CENTER);
    panel.add(simControls, BorderLayout.EAST);
    panel.add(simDisplayControls, BorderLayout.SOUTH);
    //set size of the frame
    setSize(800, 700);
    setVisible(true);// make the frame visible
    }

    Don't put the image on the layeredpane, and in fact don't create a class that subclasses JFrame. You're far better off subclassing a JPanel and drawing the image in the JPanel by overriding its paintComponent method, calling drawImage(...) in the same paintComponent method after checking that the image isn't null. Then adding all of your components to this JPanel. Be sure that the JPanels sitting on top of the main JPanel all have their opaque property set to false.
    Then when you're ready to show the app, create a JFrame on the fly, place your JPanel into the JFrame's contentPane, pack the JFrame, set it's location, and show it.
    for instance:
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.net.URL;
    public class Simulation extends JFrame
      //TODO: change this to point to your desired background image
      private static final String BACKGROUND =
        "http://upload.wikimedia.org/wikipedia/" +
        "commons/8/8e/Nebelostfriesland.jpg";
      JPanel panel = new JPanel()
        protected void paintComponent(Graphics g)
          super.paintComponent(g);
          myPaint(g);
      private BufferedImage image;
      private void myPaint(Graphics g)
        if (image != null)
          g.drawImage(image, 0, 0, panel.getWidth(), panel.getHeight(), panel);
      public Simulation()
        try
          // or if using a file on disk, can use a File here or an InputStream
          image = ImageIO.read(new URL(BACKGROUND));
        catch (IOException e)
          e.printStackTrace();
        panel2.setOpaque(false);
        //panel.setOpaque(false);
        simGrid.setOpaque(false); // etc...
    }Edited by: Encephalopathic on Dec 1, 2008 3:23 PM

  • JDeveloper problem with CMP

    Using JDeveloper 903, I receive the following error when
    attempting to run a container-managed EJB:
    SQL error: Io exception: The Network Adapter could not establish the connection
    However, the connection is fine according to the Connection wizard: clicking "Test Connection" gives "success!".
    I can also view database tables through the System Navigator Connection view. The problem seems to be the embedded oc4j server's inability to open a database connection for CMP.
    How to fix this?
    -T. Sorgo
    [email protected]

    Hi Yuval,
    Yes, this is standard default behaviour for OC4J!
    Let me guess -- you're using the JDeveloper deployment wizard, right?
    Bad move, buddy! Gee, wouldn't it be great if the JDeveloper wizards
    actually worked properly (sigh).
    Easiest thing to do is to edit the "orion-ejb-jar.xml" file immediately
    after deployment. Look for the "entity-deployment" element, and change
    the "table" attribute so that it equals the correct name of your table.
    Of-course, personally, I steer well clear of the wizards, because I
    don't know what they're doing but I'm sure it's not something that I
    want them to do.
    I also suggest you check out the documentation from either:
    http://www.atlassian.com
    or
    http://www.orionserver.com
    Good Luck,
    Avi.

  • Jdeveloper - Problem with undo/redo

    Hi,
    I am facing a problem while using the Undo/Redo option in jdeveloper. When i press the CTRL+Z(undo) option for a lengthy changes, the CTRL+Y(redo) option is not working properly.
    - Shankar S

    In my experience of JDev, The correct keyboard shortcut for redo is Shift + Ctrl + Z .
    Ctrl + Y deletes the current line.
    I don't know if that can be changed.
    Remi

  • Problem with GUI/logic

    This is really tough to explain, but here goes:
    I have a project that consists of three classes --
    1) a container (JFrame) that holds a number of JButtons and JText fields;
    2) a processing engine that handles the actions from the buttons;
    3) an object class that is a big piece of what gets displayed based on the buttons that get pushed.
    My "public static void main" is in the processing engine. All the "main" does is create an instance of the container. But the processing engine also contains the actionPerformed subclass for the buttons.
    The container class instantiates the processing engine and registers the button listeners to it. Push a button and the logic goes to the processing engine. Okay so far.
    The container also instantiates the object class, since that is what needs to be displayed. When the buttons are pushed, the display goes through a variety of changes as buttons are pushed in the correct sequence. Push one button, the object is updated. Push another one, it is updated in another way. The changes must all be reflected on the screen as they occur.
    The problem is, when I respond to the ActionEvent, the processing engine does not have an instance of the object; it has to be passed one from the container class. If I try to instantiate a new object, it will wipe out the old one. If I don't get an instance, I get nullPointers all over the place.
    So my question is: how can I pass the object from one display to the next? How can I display the object, respond to the ActionEvent by changing the object, then redisplay the modified version of the object, when I don't have an instance of the object in the ActionPerformed subclass?
    I can post the code, but it's pretty garbled by repeated attempts to solve this issue.

    Okay. Here are the three classes you requested. I built them in a hurry so there may still be syntax errors and such. But I think you can get the feel of what I'm trying to do. I can explain if not.
    <code>
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class ContainerClass extends JFrame
         JPanel cardP = new JPanel();
         JButton card1 = new JButton();
         JButton card2 = new JButton();
         JButton dealButton = new JButton();
         JButton discardButton = new JButton();
         java.net.URL img1;
         java.net.URL img2;
         ImageIcon cardIcon1 = new ImageIcon();
         ImageIcon cardIcon2 = new ImageIcon();
         JPanel displayPanel = new JPanel();
         JPanel actionPanel = new JPanel();
         ActionClass ac = new ActionClass();
         public ContainerClass()
              super("Welcome to the game");
              GridLayout gl1 = new GridLayout(2, 2, 5, 5);
              setLayout(gl1);
              setSize(1000, 800);
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         dealButton.addActionListener(ac);
         discardButton.addActionListener(ac);
         img1 = this.getClass().getResource("image01.gif");
         img2 = this.getClass().getResource("image02.gif");
         card1.setIcon(new ImageIcon(img1));
         card2.setIcon(new ImageIcon(img2));
         cardP.setLayout(new GridLayout(1,2,5,5));
         actionPanel.setLayout(new GridLayout(1,2,5,5));
         cardP.add(card1);
         cardP.add(card2);
         actionPanel.add(dealButton);
         actionPanel.add(discardButton);
         add(cardP);
         add(actionPanel);
         pack();
         setVisible(true);
    </code>
    <code>
    import java.awt.event.*;
    import java.util.*;
    public class ActionClass implements ActionListener
         ContainerClass cc;
         ObjectClass oj;
         public static void main(String[] args)
              ContainerClass cc = new ContainerClass();
         public void actionPerformed(ActionEvent e)
              String command = e.getActionCommand();
              if (command.equalsIgnoreCase("DEAL"))
                   ObjectClass oj = new ObjectClass();
                   ArrayList al = oj.getObject();
                   display(al);
              if (command.equalsIgnoreCase("DISCARD"))
                   // here I need to get the existing object and modify it. But if I
                   // instantiate a new ObjectClass, it may be different than the one I've displayed.
         public void display(ArrayList al)
              // here I need to set the icons on the JButtons in the container class
              // to the images I retrieved from the getObject() method. But if I
              // instantiate a new ContainerClass, it will create a whole new screen.
    </code>
    <code>
    import java.util.*;
    public class ObjectClass
         public ObjectClass()
              // null constructor
         public ArrayList getObject()
              // in reality, this ArrayList would consist of random Strings. However, I've used these limited elements
              // to demonstrate the structure I'm dealing with. The true scope is far greater and far more random. In
              // theory, no two ArrayLists should contain the same elements.
              ArrayList al = new ArrayList();
              String[] element1 = {"Card 1", "Card 2"};
              String[] element2 = {"Color 1", "Color 2"};
              String[] element3 = {"image01.gif", "image02.gif"};
              al.add(element1);
              al.add(element2);
              al.add(element3);
              return al;
    </code>
    That is an extremely pared-down version of what I'm trying to do.

  • Jdeveloper problem with the dataBase view

    Hi all
    hope your fine
    i have toad database and jdeveloper 10g installed on our
    machine. i connect our database in jdeveloper by using new
    database connection wizard.and the test connection give success ..
    the problem is i can see all the tables and views data but the views that i have access to view from another schema i can see in toad but not in jdeveolper ?!!
    so why is it ?

    Check if you have a filter defined on your database connection.
    If you can upgrade to 11g, then you'll find the other users on the "Other Users" section of the database browser.

  • ABAP DT for OS X: problems with GUI integration

    Anyone there able to make it work on OS X? Your help will be much appreciated.
    I've tried HANA Studio bundled from SAP, vanilla Juno and Kepler installations with tools.hana.ondemand.com repos and cannot make the SAP GUI integration to work in any of them.
    Every time I select option "Open with SAP GUI" I receive the empty tab and error message in log:
    Unable to create class 'org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor' from bundle '1154'
    Unhandled event loop exception
    and so on.
    I have to GUIs installed 7.20rev11 and 7.30.

    Now, it works for me.
    Previously I have had updated the Java SE 7 only (Default with java.com site) But the JDK version is needed. I have now installed JDK 1.7-51 and SAPGUI 7.30rev7 and it works fine.

Maybe you are looking for