Java Bug? Centering a JLable with just an icon in a JScrollPane

Hi,
I'm attempting to write a image viewing program. I would like the image centered on the window displaying them, but because some images are larger than the window, I would like the image to be in the upper left hand coner of the window with scroll bars to allow you to view the rest of the image.
I have attempted to implement this by placing a JScrollPane on a JFrame, and then placing a JLabel in the JScrollPane's Viewport. I set the Label's text to blank, and then set the image, wraped in an InageIcon, as the JLabel's Icon.
To center the JLabel, I have tried to set the JScrollPane's Viewport's LayoutManager to two different layout managers, but I've found buggy operation with each. The Layout I've tried are the following:
1. a GridLayout(1,1,0,0); - this works fine when the image is smaller that the available area of the JScrollPane. However, if the window is resized so that the image more than totally fills the JScrollPane, the image gets cut off. What happens is that the image is centered in the available scrollpane view, meaning the uper and left edges of the image get cut off. Scroll bars appear to let you view the lower and righer edges of the image, however, when you scroll, the newly uncovered areas of the image never get drawn, so you can't get to see the lower or right edges of the image either.
2. a GridbagLayout with one row, and one column each with a weight of 100, centered and told to fill both horizontally and vertically. Again, this correctly centers the JLabel when th eimage is smaler than the available space in the JScrollPane. Once the window is resized so that the image is bigger than the space to view the image in, strange problems occur. This time it seems that the JScrollPane's scrollbars show that there should be enough room to show the image if the image was in the upper left corner, however, the image isn't in the upper left corner, it is offset down and to the right if the upper left corner by an amount that appears equal to the amount of extra space needed to display the image. For example, if the image is 200x300 and the view area is 150x200, ite image is offest by 50 horizontally and 100 vertically. This results in the bottom and right edges of the image getting cut off because the scrollbars only scroll far enough to show the image if the image was placed at 0,0 and not at the offset location that it is placed at.
You may not understand what I'm trying to say from my description, but below is code that can reproduce the problem.
Questions. Am I doing anything wrong that is causing this problem? Is that another, better way to center the JLabel that doesn't have these problems? Is this a JAVA Bug in either the layoutmanagers, JScrollPane or JLabel when it only contains an icon and no text?
Code:
this is the class that creates and lays out the JFrame. It currently generates a 256x256 pixel image. By changing the imagesize variable to 512, you can get a larger image to work with which will make the bug more obvious.
When first run the application will show what happens when using the GridLayout and described in 1. There are two commented out lines just below the GridLayout code that use a GridbagLayout as descriped in method 2. Comment out the GridLayout code when you uncomment the GridBageLayout code.
package centertest;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.image.*;
public class Frame1 extends JFrame {
    JPanel contentPane;
    BorderLayout borderLayout1 = new BorderLayout();
    JScrollPane jScrollPane1 = new JScrollPane();
    JLabel jLabel1 = new JLabel();
    static final int imagesize=256;
    //Construct the frame
    public Frame1() {
        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
        try {
            jbInit();
        catch(Exception e) {
            e.printStackTrace();
    //Component initialization
    private void jbInit() throws Exception  {
        contentPane = (JPanel) this.getContentPane();
        contentPane.setLayout(borderLayout1);
        this.setSize(new Dimension(400, 300));
        this.setTitle("Frame Title");
        //setup label
        jLabel1.setIconTextGap(0);
        jLabel1.setHorizontalAlignment(JLabel.CENTER);
        jLabel1.setVerticalAlignment(JLabel.CENTER);
        jLabel1.setVerticalTextPosition(JLabel.BOTTOM);
        //create image and add it to the label as an icon
        int[] pixels = new int[imagesize*imagesize];
        for(int i=0;i<pixels.length;i++){
            pixels=i|(0xff<<24);
MemoryImageSource mis = new MemoryImageSource(imagesize, imagesize,
pixels, 0, imagesize);
Image img = createImage(mis);
jLabel1.setIcon(new ImageIcon(img));
jLabel1.setText("");
contentPane.add(jScrollPane1, BorderLayout.CENTER);
//center image using a GridLayout
jScrollPane1.getViewport().setLayout(new GridLayout(1,1,0,0));
jScrollPane1.getViewport().add(jLabel1);
//Center the image using a GridBagLayout
/*jScrollPane1.getViewport().setLayout(new GridBagLayout());
jScrollPane1.getViewport().add(jLabel1,
new GridBagConstraints(0, 0, 1, 1, 100.0, 100.0,
GridBagConstraints.CENTER, GridBagConstraints.BOTH,
new Insets(0, 0, 0, 0), 0, 0));
//Overridden so we can exit when window is closed
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if (e.getID() == WindowEvent.WINDOW_CLOSING) {
System.exit(0);
and here is an application with which to launch the frame
package centertest;
import javax.swing.UIManager;
import java.awt.*;
public class Application1 {
    boolean packFrame = false;
    //Construct the application
    public Application1() {
        Frame1 frame = new Frame1();
        //Validate frames that have preset sizes
        //Pack frames that have useful preferred size info, e.g. from their layout
        if (packFrame) {
            frame.pack();
        else {
            frame.validate();
        //Center the window
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension frameSize = frame.getSize();
        if (frameSize.height > screenSize.height) {
            frameSize.height = screenSize.height;
        if (frameSize.width > screenSize.width) {
            frameSize.width = screenSize.width;
        frame.setLocation( (screenSize.width - frameSize.width) / 2,
                          (screenSize.height - frameSize.height) / 2);
        frame.setVisible(true);
    //Main method
    public static void main(String[] args) {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        catch (Exception e) {
            e.printStackTrace();
        new Application1();
}I'm running Java 1.4.1 build 21 on Windows 98. I used JBuilder8 Personal to write this code.

Hmmm,
You are correct. Not setting a layout for the scrollpane's viewport (using the default of javax.swing.ViewportLayout) results in the positioning of the image tat I want (center the image if image is smaller than the scrollpane, if the image is larger, place it in the upper-left corener and enable the scrollbars to scroll to see the rest of the image).
Anyone have any idea why the GridLayout and GridBagLayout act as they do? I gues it isn't that important tomy program, but I'm still not sure that they are operating correctly. (Specifically, GridLayout sha scrollbars, but when you scroll, no new parts of the image are revealed.)

Similar Messages

  • Problem with JMenus that Persist - Is this a Java bug?

    I am having a problem with JMenus that persist. By this I mean
    that my drop down menus persist on the screen even after they have
    been selected.
    I've checked the Java bug database, and the following seems
    to come closest to my problem:
    Bug ID: 4235188
    JPopupMenus and JMenus persist when their JFrame becomes visible
    State: Closed, not a bug
    http://developer.java.sun.com/developer/bugParade/bugs/4235188.html
    This page says that the matter is closed and is not a bug. The
    resolution of this matter printed at the bottom of the page
    is completely abstruse to me and I would appreciate any
    comments to understand what they are talking about.
    The code at the end of my message illustrates my problem.
    1. Why should paintComponent() make any difference to
    Menu behavior?
    2. Is this a bug?
    3. What's the workaround if I have to paint() or repaint()?
    Thanks
    Tony Lin
    // Example of Menu Persistence Problem
    // Try running this with line 41, paintComponent(), and without line 41
    // Menus behave normally if line 41 is commented out
    // If line 41 exists, menus will persist after they have been selected
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class P2 extends JPanel {
    JMenuItem[] mi;
    public P2() {
    JFrame thisFrame = new JFrame();
    thisFrame.getContentPane().add(this);
    JMenu menu = new JMenu("My Menu");
    JMenuBar mb = new JMenuBar();
    mi = new JMenuItem[4];
    for (int i=0; i<mi.length; i++) {
    mi[i] = new JMenuItem("Menu Item " + String.valueOf(i));
    menu.add(mi);
    mb.add(menu);
    thisFrame.setJMenuBar(mb);
    thisFrame.setSize(400,200);
    thisFrame.setLocation(150,200);
    thisFrame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent we) {
    System.exit(0);
    thisFrame.setVisible(true);
    public void paintComponent(Graphics g) {} //Affects menu behavior!
    public static void main(String[] args) {
    new P2();

    Well, my understanding of the way painting works is that a component doesn't UNPAINT itself. Instead a message is sent to the component under the coordinates of the menu to REPAINT itself.
    In your demo program the JFrame is the component under the JMenu. The paintComponent() method of JFrame is empty, so nothing gets repainted.
    I added super.paintComponent(g); to the method and everything works fine.

  • Why can't I run my Java program with just the JRE, the JDK is required?

    I've recently written 3 programs in Java using the Netbeans IDE with JDK 1.6 as the default Java platform. The compile-time libraries include the Swing Application Framework. I use BuildDesk from ProductiveMe to package the each program into a Windows installer.
    When I install the programs on a new computer without a JRE or JDK being present, and attempt to run them I get an error (as expected) stating that there is no JVM. The messages says that I need to install JDK 1.3 or higher. I downloaded the latest JRE onto the new computer and attempted to run the programs and I get the same error message. My question is, why can't I run these programs with just the JRE installed? Why do I need the JDK? When I install the JDK, the programs run fine. The typical user may not have the JDK on their system, but they likely have the JRE if they've run Java programs before.
    Is the answer as simple as there must be library functions being used by the programs that belong to the JDK, but not the JRE? I'd rather a user not have to install the JDK verses the JRE because they may also have to update some Windows environment variables.
    Thank you for any help on this issue.

    915088 wrote:
    Thanks for your replies. I further investigated BuildDesk and found an option which allows a JVM check but that check needs the JDK. I stopped the JVM check and rebuilt using BuildDesk and it now only requires the JRE to run the programs. The reason why I use BuildDesk is to package more than just the jar file for the user. BuildDesk allows me to create a installation folder structure as well as include any other files in the build. I could just as well zipped all this together for the user but decided against that method.I don't think anyone will question your usage of an installer tool; that is entirely up to you. But what is questionable is that you have problems with that installer tool and then go look for help in a Java programming forum. The next time, go look for help at the source. If there is no way to acquire help (support, a forum, a mailinglist, anything) then that is a very good reason to not use the product in question.

  • How to find my submitted bug report in Java bug database

    I just submitted a bug report in Java bug database and it told me that the submission is successful without its bug ID and no email notification is received from Oracle.
    And I cannot find the bug in bug database with the title I submitted.
    The bug's product/category is Java Plug-in in JRE7
    So how could I get the bug status? Will it be fixed and how is it going on?

    I just submitted a bug report in Java bug database and it told me that the submission is successful without its bug ID and no email notification is received from Oracle.Last time I did that it also said it wouldn't appear straight away. They have to qualify bugs you know.
    And I cannot find the bug in bug database with the title I submitted.How long ago?
    So how could I get the bug status?Wait till it turns up?
    Will it be fixed and how is it going on?How would anyone on this forum know?

  • JList bug? Or is it just me? Testers needed

    I have been having a minor but definitely irritating problem with an application I wrote. In several places I have 2 JList boxes inside JScrollPanes. Clicking on an item in the first list should instantly update the contents of the second. Most of the time it does just that. But it seems like 20% of the time my mouse click is ignored, or atleast the action is not acted on (the first list's item gets highlighted, but the second list does not update). It seems to either be OS or JDK version related as I created a simple test program and tried running it on a different OS with a different version (Solaris server with JDK 1.2.2), and there it worked fine. My system, which is where the problem occured uses Win2000 and I am using JDK 1.4.0. I tried reporting this bug to Sun but they wrote back and said they could not reproduce the bug.
    Is there some weird glitch with just my PC? Or has anyone else ever seen anything like this? I will paste my test program code below. To use it, just keep selecting different items in the left-hand list and noting whether the contents of the right-hand list change to match. If you can do this about 20 times and they stay in sync, then it works fine for you. Otherwise please let me know! And if anyone can actualy help me prove to sun that this is a bug, or provide a fully-functional workaround I'll hand out some Duke Dollars.
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import java.awt.*;
    * Used to test an aparent bug in JList or MouseAdapter
    public class JListTest extends JFrame
       private Container    contentPane;
       private JScrollPane  scrollOne, scrollTwo;
       private JList        listOne, listTwo;
       private static final String[] listOneItems =
          {"Letters", "Pets", "Names", "Sports"};
       private static final String[] letterItems =
          {"A", "B", "C", "D", "E", "F", "G", "H"};
       private static final String[] petItems =
          {"Cat", "Dog", "Bird", "Fish", "Lizard", "Feret"};
       private static final String[] nameItems =
          {"Joe", "Bob", "Mike", "Sally", "Julie", "Mary", "Tony"};
       private static final String[] sportItems =
          {"Football", "Basketball", "Hockey", "Baseball", "Track & Field"};
       * Constructor
       public JListTest()
          super("JList Test");
          contentPane = this.getContentPane();
          contentPane.setLayout(new BorderLayout());
          listOne = new JList();
          listTwo = new JList();
          listOne.setFixedCellWidth(200);
          listTwo.setFixedCellWidth(200);
          scrollOne = new JScrollPane(listOne,
                   JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                   JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
          scrollTwo = new JScrollPane(listTwo,
                   JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                   JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
          listOne.setListData(listOneItems);
          contentPane.add(scrollOne, BorderLayout.WEST);
          contentPane.add(scrollTwo, BorderLayout.EAST);
          this.setResizable(true);
          addEventHandlers();
          this.setLocation(100,40);
          this.pack();
          this.setVisible(true);
       private void addEventHandlers()
          listOne.addMouseListener(new MouseAdapter()
             public void mouseClicked(MouseEvent e)
                handleMouseClicks(e);
          // Handles clicking on the window's "x" button to close it
          this.addWindowListener(new WindowAdapter()
             public void windowClosing(WindowEvent e)
                System.exit(1);
       protected void handleMouseClicks(MouseEvent e)
          int listIndex = listOne.getSelectedIndex();
          if (listIndex == 0)
             listTwo.setListData(letterItems);
          else if (listIndex == 1)
             listTwo.setListData(petItems);
          else if (listIndex == 2)
             listTwo.setListData(nameItems);
          else if (listIndex == 3)
             listTwo.setListData(sportItems);
       public static void main(String[] args)
          JListTest jListTest = new JListTest();
    }

    I am not able to reproduce what you have seen, but have you tried using a ListSelectionListener in place of your MouseListener?
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import java.awt.*;
    /*** Used to test an aparent bug in JList or MouseAdapter*/
    public class JListTest
        extends JFrame
        private              Container   contentPane;
        private              JScrollPane scrollOne, scrollTwo;
        private              JList       listOne, listTwo;
        private static final String[]    listOneItems = {"Letters", "Pets", "Names", "Sports"};
        private static final String[]    letterItems  = {"A", "B", "C", "D", "E", "F", "G", "H"};
        private static final String[]    petItems     = {"Cat", "Dog", "Bird", "Fish", "Lizard", "Feret"};
        private static final String[]    nameItems    = {"Joe", "Bob", "Mike", "Sally", "Julie", "Mary", "Tony"};
        private static final String[]    sportItems   = {"Football", "Basketball", "Hockey", "Baseball", "Track & Field"};
        /**   * Constructor   */
        public JListTest()
            super("JList Test");
            contentPane = this.getContentPane();
            contentPane.setLayout(new BorderLayout());
            listOne = new JList();
            listOne.setFixedCellWidth(200);
            listOne.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); // <------------------------------<<<
            listTwo = new JList();
            listTwo.setFixedCellWidth(200);
            scrollOne = new JScrollPane( listOne,
                                         JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                                         JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
            scrollTwo = new JScrollPane( listTwo,
                                         JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
                                         JScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
            listOne.setListData(listOneItems);
            contentPane.add(scrollOne, BorderLayout.WEST);
            contentPane.add(scrollTwo, BorderLayout.EAST);
            this.setResizable(true);
            addEventHandlers();
            this.setLocation(100,40);
            this.pack();
            this.setVisible(true);
        private void addEventHandlers()
            listOne.addListSelectionListener( // <------------------------------<<<
                new ListSelectionListener() {
                    public void valueChanged(ListSelectionEvent e)
                        if ( ! e.getValueIsAdjusting()) { // <------------------------------<<<
                            handleListSelection();
            // Handles clicking on the window's "x" button to close it
            this.addWindowListener(
                new WindowAdapter() {
                    public void windowClosing(WindowEvent e)
                        System.exit(1);
        protected void handleListSelection() // <------------------------------<<<
            int listIndex = listOne.getSelectedIndex();
            if (listIndex == 0) {
                listTwo.setListData(letterItems);
            } else if (listIndex == 1) {
                listTwo.setListData(petItems);
            } else if (listIndex == 2) {
                listTwo.setListData(nameItems);
            } else if (listIndex == 3) {
                listTwo.setListData(sportItems);
        public static void main(String[] args)
            JListTest jListTest = new JListTest();
    }

  • [svn:fx-trunk] 6993: * Fixed a duplicate Bindable metadata bug that showed up with

    Revision: 6993
    Author:   [email protected]
    Date:     2009-05-16 23:57:42 -0700 (Sat, 16 May 2009)
    Log Message:
    Fixed a duplicate Bindable metadata bug that showed up with
      describeType().
    tests Passed: checkintests
    Needs QA: YES, just confirm the bug fix, please.
    Needs DOC: NO
    Bug fixes: SDK-21133
    API Change: NO
    Reviewer: Pete F.
    Code-level description of changes:
      BindableSecondPassEvaluator.java
        Modified moveMetaDataToNewDefinition() to no longer insert the new
        Bindable metadata into the definition's statement list, because
        prepMetaDataNode() already handles this.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableSecondPassEva luator.java

    I just noticed that for some reason the project is using an old path to my SVN repository. I recreated it and reimported the project but for some reason Xcode didn't realize that. I'm betting there's some little file somewhere that's causing my problem.

  • IPod bug on iPhone 4 with iOS 4.2.1

    This has happened a few times with different albums/tracks:
    I'll play an album and realize that a track has skipped and/or a track starts playing a few seconds into the track. Hitting "back" doesn't fix the problem; the track just starts playing at the wrong spot again no matter what I do. Basically the "start" position for certain songs gets set to the very end of the track (resulting in the track immediately ending and moving on to the next track) or the start position gets set to a few seconds into the track. Only an iPhone reboot fixes this. I can't figure out any reason why certain tracks are affected. There is nothing wrong with the tracks. They are fine on the computer and fine after an iPhone reboot.
    Anyone else having this problem? I'm close to doing a restore of my phone because of wifi and AirPlay related issues. This problem just pushes me closer.
    Erik

    I'm having the same exact problem with my iPod Touch with iOS 4.2.1.
    Also the album art doesn't always show on the lock screen and the videos and songs sometime start from the position I left them to, even if I listened to something else after.
    Apple better release their 4.2.2 or 4.3 soon and correct these bugs because 4.1 was just fine for me.

  • Bug report - Copy page with IR raises ORA-3113

    Apex 3.1.2.00.02 on Oracle 9.2.0.8
    When I copy a page with an IR using the Copy Page wizard (from page X to Y in the same app), I get the following error in the Apache log
    I don't change a single thing in the Copy Page Wizard, just accept all the defaults and click Finish and that's when wwv_flow.accept crashes.
    [Wed Aug 26 10:21:56 2009] [error] [client xx.xx.xx.xx] [ecid: 1251296511:xx.xx.xx.xx:7628:0:4981,0] mod_plsql: /pls/public/wwv_flow.accept HTTP-404 ORA-03113: end-of-file on communication channel
    [Wed Aug 26 10:21:56 2009] [alert] [client xx.xx.xx.xx] [ecid: 1251296511:xx.xx.xx.xx:7628:0:4981,0] mod_plsql: Unable to reset state for mode 0: Err 3114 url=>/pls/public/wwv_flow.acceptThe trace file in bdump dir shows this
    *** 2009-08-26 10:21:51.331
    *** SESSION ID:(49.33134) 2009-08-26 10:21:51.329
    Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x1, PC: [0x101003cb8, 0000000101003CB8]
    *** 2009-08-26 10:21:51.331
    ksedmp: internal or fatal error
    ORA-07445: exception encountered: core dump [0000000101003CB8] [SIGSEGV] [Address not mapped to object] [0x000000001] [] []
    Current SQL statement for this session:
    INSERT INTO WWV_FLOW_WORKSHEETS ( ID, FLOW_ID, PAGE_ID, REGION_ID, NAME, FOLDER_ID, ALIAS, REPORT_ID_ITEM, MAX_ROW_COUNT, MAX_ROW_COUNT_MESSAGE, NO_DATA_FOUND_MESSAGE, MAX_ROWS_PER_PAGE, SEARCH_BUTTON_LABEL, PAGE_ITEMS_TO_SUBMIT, SORT_ASC_IMAGE, SORT_ASC_IMAGE_ATTR, SORT_DESC_IMAGE, SORT_DESC_IMAGE_ATTR, SQL_QUERY, BASE_TABLE_OR_VIEW, BASE_PK1, BASE_PK2, BASE_PK3, SQL_HINT, STATUS, ALLOW_REPORT_SAVING, ALLOW_REPORT_CATEGORIES, SHOW_NULLS_AS, PAGINATION_TYPE, PAGINATION_DISPLAY_POSITION, BUTTON_TEMPLATE, SHOW_FINDER_DROP_DOWN, SHOW_DISPLAY_ROW_COUNT, SHOW_SEARCH_BAR, SHOW_SEARCH_TEXTBOX, SHOW_ACTIONS_MENU, ACTIONS_MENU_ICON, FINDER_ICON, REPORT_LIST_MODE, SHOW_DETAIL_LINK, SHOW_SELECT_COLUMNS, SHOW_FILTER, SHOW_SORT, SHOW_CONTROL_BREAK, SHOW_HIGHLIGHT, SHOW_COMPUTATION, SHOW_AGGREGATE, SHOW_CHART, SHOW_CALENDAR, SHOW_FLASHBACK, SHOW_RESET, SHOW_DOWNLOAD, DOWNLOAD_FORMATS, DOWNLOAD_FILENAME, CSV_OUTPUT_SEPARATOR, CSV_OUTPUT_ENCLOSED_BY, DETAIL_LINK, DETAIL_LINK_TEXT, DETAIL_LINK_ATTR, DETAIL_LINK_CHECKSUM_TYPE, DETAIL_LINK_CONDITION_TYPE, DETAIL_LINK_COND, DETAIL_LINK_COND2, DETAIL_LINK_AUTH_SCHEME, ALLOW_EXCLUDE_NULL_VALUES, ALLOW_HIDE_EXTRA_COLUMNS, MAX_QUERY_COST, MAX_FLASHBACK, WORKSHEET_FLAGS, DESCRIPTION, OWNER ) VALUES ( :B71 , :B70 , :B69 , :B68 , :B67 , :B66 , :B65 , :B64 , :B63 , :B62 , :B61 , :B60 , :B59 , :B58 , :B57 , :B56 , :B55 , :B54 , :B53 , :B52 , :B51 , :B50 , :B49 , :B48 , :B47 , :B46 , :B45 , :B44 , :B43 , :B42 , :B41 , :B40 , :B39 , :B38 , :B37 , :B36 , :B35 , :B34 , :B33 , :B32 , :B31 , :B30 , :B29 , :B28 , :B27 , :B26 , :B25 , :B24 , :B23 , :B22 , :B21 , :B20 , :B19 , :B18 , :B17 , :B16 , :B15 , :B14 , :B13 , :B12 , :B11 , :B10 , :B9 , :B8 , :B7 , :B6 , :B5 , :B4 , :B3 , :B2 , :B1 ) RETURNING SQL_QUERY INTO :B0
    ----- PL/SQL Call Stack -----
      object      line  object
      handle    number  name
    3f64fc090     10065  package body FLOWS_030100.WWV_FLOW_API
    4006611a8      1980  package body FLOWS_030100.WWV_FLOW_COPY_PAGE
    4006611a8      3869  package body FLOWS_030100.WWV_FLOW_COPY_PAGE
    401886520        52  anonymous block
    3ecf09680      1120  package body SYS.DBMS_SYS_SQL
    3fb977730       285  package body SYS.WWV_DBMS_SQL
    3fd2f1448      4278  package body FLOWS_030100.WWV_FLOW
    3fd2f1448     12853  package body FLOWS_030100.WWV_FLOW
    3eaee2850        10  anonymous blockIt seems to be a problem with just this particular page. I am able to copy other pages with IRs just fine.
    As a workaround, I created a Blank page and used the Copy Region wizard to copy the IR region over to the blank page. Same error. Looks like this particular IR's metadata is somehow corrupted?
    Help? Thanks

    I can try. I rarely use the Builder UI to import applications because it is extremely painfu land usually never works but with apex.oracle.com I don't have a choice.
    First, I used the Import function to install my app. After a long time, I got an error
    But the file was already uploaded so I went to the Export/Import repository and clicked on the Install link. I chose the auto assign a new app id and clicked Install and after a long time I got this error.
    So I used the browser's Back button to go back a couple of screens and clicked the Install button and got this error
    Just on a whim, I went to the Builder home page and voilà the application was already there! Hopefully, the import function will be improved soon. But I digress.
    Anyway, I am not able to reproduce this. The Copy Page functions works fine on apex.oracle.com. Looks like it is indeed a 9.2 bug. I will see if dropping and re-importing the app helps.
    Thanks

  • Is anyone else having a weird bug in MobileMe gallery with volume on iOS 5

    Is anyone else having a weird bug in MobileMe gallery with volume on iOS 5? I am having a weird problem, where if I view a video I have uploaded and change the volume, I used the on-screen slider and It changed the volume but it also popped up like I was controlling it from the side. I thought that was kind of weird. If you want to see my problem, there will be a video up on Contemputech.com within a half-hour of me writing this.
    Thanks!
    Nolan

    Hello everyone!
    I'm hoping you are no longer having problems with your iPhone visual voice mail.
    I can understand how frustrating it is to not be able to access such a great feature on your iPhone.
    We did determine  customers not being able  to access Visual Voicemail on their iPhones.
    Common errors are "visual voicemail is not available" or it just keeps loading the message. 
    (In the meantime, you can still review voicemail messages by dialing *86)
    This issue should have been resolved for everyone effective 3/2/12.
    Please let me know if you are still having problems with iPhone Visual Voicemail by sending me a direct message.
    Thanks for your patience with this.
    Tamara H.
    Follow us on Twitter @VZWSupport

  • Re: [Fwd: Java Applet IIOP Call-In with Release 3C--How dowe speed up d

    Hi Michael,
    We have done exactly what you describe and have avoided the slow applet
    download times. Although it can be a bit tricky, it is possible to use
    the ORB bundled inside the Netscape 4.0 browser (Visibroker for Java by
    Visigenic). Most of the code should follow Netscape's examples (on
    http://developer.netscape.com)--just remember to initialize the ORB by
    passing a reference to the current applet in orb_init() (so that you
    invoke something like orb_init(this) [assuming you are extending
    java.applet.Applet]). Pulling up the Java console within your web
    browser should help debug quite a bit (a lot of debug messages will get
    printed there the ORB is having problems).
    Netscape has just implemented the applet caching schemes you describe,
    so it probably shouldn't matter too much if you use another vendor's
    ORB (we've done this with Iona's OrbixWeb). If you use ZIP files, they
    have to be uncompressed, and I don't think that the browser will cache
    them between browser sessions. Netscape 4.0 does seem to handle
    compressed JAR files just fine and it does indeed cache them between
    browser sessions. I'd go with the JAR format anyway since the ZIP
    bundling was just a workaround until Sun got their act together in the
    1.1 JDK.
    By the way, you also might want to take advantage of the code-signing
    and capabilities APIs of Netscape if you are going to invoke methods on
    objects not resident on your web server. Otherwise, you will probably
    run into the (in)famous browser applet security restrictions and you may
    have other problems doing things like callbacks from Forte, etc.
    If you want more detail on how it works, let me know and I can post some
    examples.
    Oh, one last thing: we are a consulting firm specializing in these kinds
    of things :)
    Bill
    Subject: Java Applet IIOP Call-In with Release 3C--How do we speed up download time.
    Date: Wed, 2 Jul 1997 09:10:31 -0500
    From: Michael Nelson <[email protected]>
    To: "'[email protected]'" <[email protected]>
    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time
    for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the
    net
    are not uncommon. We dialed into our network at 28.8K (but no
    hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since
    the
    introduction of Netscape Navigator 3.0, you can specify an
    uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes
    from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP
    connections
    required to fetch applet code. As an added benefit, Netscape caches
    the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation
    for
    its development was so that Java applets and their requisite
    components
    can be downloaded to a browser in a single HTTP transaction, rather
    than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces
    the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to
    work.
    Has any one used these or other approaches to speed up applet
    download
    time? Or, does anyone know of consulting firms that specialize in
    this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157
    Billy L. Williams, Jr. | email: [email protected]
    Sage Solutions, Inc. | Tel: (415) 392-7243 (x506) Fax: (415) 391-3899
    | Pager: (415) 605-1791 (page me if urgent)

    Hi Michael,
    We have done exactly what you describe and have avoided the slow applet
    download times. Although it can be a bit tricky, it is possible to use
    the ORB bundled inside the Netscape 4.0 browser (Visibroker for Java by
    Visigenic). Most of the code should follow Netscape's examples (on
    http://developer.netscape.com)--just remember to initialize the ORB by
    passing a reference to the current applet in orb_init() (so that you
    invoke something like orb_init(this) [assuming you are extending
    java.applet.Applet]). Pulling up the Java console within your web
    browser should help debug quite a bit (a lot of debug messages will get
    printed there the ORB is having problems).
    Netscape has just implemented the applet caching schemes you describe,
    so it probably shouldn't matter too much if you use another vendor's
    ORB (we've done this with Iona's OrbixWeb). If you use ZIP files, they
    have to be uncompressed, and I don't think that the browser will cache
    them between browser sessions. Netscape 4.0 does seem to handle
    compressed JAR files just fine and it does indeed cache them between
    browser sessions. I'd go with the JAR format anyway since the ZIP
    bundling was just a workaround until Sun got their act together in the
    1.1 JDK.
    By the way, you also might want to take advantage of the code-signing
    and capabilities APIs of Netscape if you are going to invoke methods on
    objects not resident on your web server. Otherwise, you will probably
    run into the (in)famous browser applet security restrictions and you may
    have other problems doing things like callbacks from Forte, etc.
    If you want more detail on how it works, let me know and I can post some
    examples.
    Oh, one last thing: we are a consulting firm specializing in these kinds
    of things :)
    Bill
    Subject: Java Applet IIOP Call-In with Release 3C--How do we speed up download time.
    Date: Wed, 2 Jul 1997 09:10:31 -0500
    From: Michael Nelson <[email protected]>
    To: "'[email protected]'" <[email protected]>
    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time
    for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the
    net
    are not uncommon. We dialed into our network at 28.8K (but no
    hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since
    the
    introduction of Netscape Navigator 3.0, you can specify an
    uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes
    from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP
    connections
    required to fetch applet code. As an added benefit, Netscape caches
    the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation
    for
    its development was so that Java applets and their requisite
    components
    can be downloaded to a browser in a single HTTP transaction, rather
    than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces
    the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to
    work.
    Has any one used these or other approaches to speed up applet
    download
    time? Or, does anyone know of consulting firms that specialize in
    this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157
    Billy L. Williams, Jr. | email: [email protected]
    Sage Solutions, Inc. | Tel: (415) 392-7243 (x506) Fax: (415) 391-3899
    | Pager: (415) 605-1791 (page me if urgent)

  • Java Server/Client Applicaton - problem with sending data back

    Hello!
    I'm trying to write a small server/client chat application in Java. It's server with availability to accept connections from many clients and it's app just for fun... However, I've come up against a huge problem: everything what clients send, arrives to server (I'm sure about that because it is displayed on the Server Application screen) and then server should send it back to all clients but it doesn't work. I have no faintest idea what causes this problem. Maybe you can help me?
    Here is my server app code:
    import java.net.*;
    import java.util.*;
    import java.io.*;
    * @author Robin
    public class Server {
        ServerSocket serw = null;
        Socket socket = null;
        String line = null;
        Vector<ClientThread> Watki = new Vector();
        ClientThread watek = null;
        public Server(int port) {
            try {
                serw = new ServerSocket(port);           
                line = "";
                while(true) {
                    System.out.println("Running. Waiting for client to connect...");
                    socket = serw.accept();
                    System.out.println("Connected with:\n" + socket.getInetAddress() + "\n");
                    watek = new ClientThread(socket);
                    Watki.addElement(watek);
                    Watki.firstElement().Send("doszlo?");
            }catch (IOException e) {
                System.out.println("BLAD: " + e);
        public void sendToAll(String s) {
            for(int i = 0; i < Watki.size(); i++) {
                Watki.elementAt(i).Send(s);
        public class ClientThread extends Thread {
            Socket socket;
            DataInputStream in = null;
            DataOutputStream out = null;
            String line = null;
            public ClientThread(Socket s) {
                try {
                    this.socket = s;
                    in = new DataInputStream(s.getInputStream());
                    out = new DataOutputStream(s.getOutputStream());
                    start();
                }catch (IOException e) {
                    System.out.println("BLAD: " + e);
            public void Send(String s) {
                try {
                    out.writeUTF(s);
                }catch (IOException e) {
                    System.out.println("BLAD: " + e);
            public void run() {
                try {
                    line = "";
                    while (true) {
                        line = in.readUTF();
                        System.out.println(line);
                        sendToAll(line);
                }catch (IOException e) {
                    System.out.println("BLAD: " + e);
        public static void main(String[] args) {
            Server serwer = new Server(5000);
    }And here is client app code:
    import java.net.*;
    import java.util.*;
    import java.io.*;
    * @author Robin
    public class Client implements Runnable {
        Socket socket = null;
        BufferedReader keyIn = new BufferedReader(new InputStreamReader(System.in));
        DataInputStream in = null;
        DataOutputStream out = null;
        String line = null;
        public Client(String host, int port) {
            try {
                System.out.println("Connecting to " + host + ":" + port);
                socket = new Socket(host, port);
                System.out.println("Connected\nTALK:");
                out = new DataOutputStream(socket.getOutputStream());
                in = new DataInputStream(socket.getInputStream());
                line = "";
                while(!line.toLowerCase().equals(".bye")) {
                    line = keyIn.readLine();
                    Send(line);
            }catch (UnknownHostException e) {
                System.out.println("BLAD: " + e);
            }catch (IOException e) {
                System.out.println("BLAD: " + e);
        public void Send(String s) {
            try {
                out.writeUTF(s);
            }catch (IOException e) {
                System.out.println("BLAD: " + e);
        public void run() {
            String loaded = "";
            try {
                while(true) {
                    loaded = in.readUTF();
                    System.out.println(loaded);
            }catch (IOException e) {
                System.out.println("BLAD: " + e);
        public static void main(String[] args) {
            Client client = new Client("localhost", 5000);
    }By the way, this app is mainly written in English language (text that appears on the screen) however in functions I used Polish language (for example: BLAD - it means ERROR in English). Sorry for that :)

    Yeap, I will change those exceptions later, thanks for advice.
    You asked what's going on with it: both applications start with no errors, but when I write something in client side it should be sent to the server and then forwarded to all connected clients but it stops somewhere. However, I added a one line to the server code
    line = in.readUTF();
    System.out.println(line);
    sendToAll(line); and after it reads message from client (no matter which one) it shows that message on the server side screen, then it should send this message to all clients but it doesn't work in this moment. What's confusing: no errors occurs, so it's rather a mistake in my code, but where?
    Edited by: Robin3D on Sep 30, 2009 9:07 AM

  • [svn] 4793: Fix bug SDK-17734 Path with width and height set different than path data has incorrect bounds

    Revision: 4793
    Author: [email protected]
    Date: 2009-02-02 11:20:06 -0800 (Mon, 02 Feb 2009)
    Log Message:
    Fix bug SDK-17734 Path with width and height set different than path data has incorrect bounds
    Fix: When calculating the bounds position we should take into account the implicit scaling factor actualSize/naturalSize. Also did some refactoring, getting rid of the protected method calculateTopLeft.
    QE Notes: None
    Doc Notes: None
    Bugs: SDK-17734
    Reviewer: Ryan
    tests: mustella gumbo/layout/GraphicElement
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17734
    http://bugs.adobe.com/jira/browse/SDK-17734
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Ellipse.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.a s

    Thank you so much for replying.
    Yes I have removed and reinstalled WMP.
    I had good results with the PD6 application installed on the default path onto the C: drive with the one exception that if the application was launched by accident and the user data path was not available, the PD6 application would blow away my custom user path registry settings. Now that I know what they are I have made a .reg file to repair my registry to my desired user data paths.
    Installing the application on the removable drive appeared to help prevent me from launching the application by accident and overwriting my registry with default user paths.
    So which is the less of the two evils?
    If the application directory is not available, windows media player still tries to launch the .msi for installing PD6.
    If I install the application to the C: drive but the user data to the removable drive, launching the PD6 application without the user data drive will still corrupt my registry settings for a user data path.
    Both these issues seem like a logical (if not easy) fix that should be done in the PD6 application and installation package. I mean really, cannot anyone tell me why windows media player is checking the PD6 application directory? Why in PD4 did we have an option control for setting the user data path from the PD4 application? Why is this option not in the PD6 application, just the installer?
    I am given a choice during installation to move the user data to another non default location. Why else would this be provided if not to accommodate my kind of request to store the user data into an alternate location other than “My Document”. Certainly Palm is not trying to force the users on how to protect and store their personal data?
    Post relates to: Centro (Verizon)

  • Is there a pre-built VM with just Oracle Linux?

    I want to try out installing Oracle Database 11gR2 on a Virtualbox without going through installing Oracle Linux in a Windows Host so I'm looking for a pre-built VM with just Oracle Linux. Most of the VMs available in Pre-Built Developer VMs (for Oracle VM VirtualBox) http://www.oracle.com/technetwork/community/developer-vm/index.html already have Oracle Database installed. It seems that my only choice is to use Enterprise Java Development VM. I notice there is something called Oracle VM template but it does not seem to be for Virtualbox. Thanks for any help.

    881656 wrote:
    I want to try out installing Oracle Database 11gR2 on a Virtualbox without going through installing Oracle Linux in a Windows Host so I'm looking for a pre-built VM with just Oracle Linux. Most of the VMs available in Pre-Built Developer VMs (for Oracle VM VirtualBox) http://www.oracle.com/technetwork/community/developer-vm/index.html already have Oracle Database installed. It seems that my only choice is to use Enterprise Java Development VM. I notice there is something called Oracle VM template but it does not seem to be for Virtualbox. Thanks for any help.
    I would second Bjorn's suggestion to just go ahead and install Oracle Linux from scratch. As a DBA you need to be familiar with a lot of OS level admin stuff, so installing the OS from scratch and doing the minimal configuration needed to install Oracle is, in itself, an important part of your professional development. If you take a shortcut of using a pre-built vm you are just stunting your own growth.

  • Bug in ResultSet#getDate() with ojdbc7-12.1.0.1

    As "documented" here java - ResultSet#getDate() semantics - Stack Overflow there seems to be a bug in ResultSet#getDate() with ojdbc7-12.1.0.1.
    The java.sql.Date condition
    To conform with the definition of SQL DATE, the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero
    is violated.
    How can we report that to Oracle?

    Hello Hwang
    1/ I don't know for your first question. Have you checked all the RUEI rpm prerequisites? One should be missing probably.
    2/ One solutions consists of installing and configuring Squid proxy on the RUEI server. Then you can use your own browser with ruei server as a proxy and surf. You also need to tweak RUEI to collect traffic within the right network card.
    as $RUEI_USER :
    execsql config_set_profile_value wg profile_wg_localhost_1 config ForceInterface add eth0
    replace wg by the name of your profle (probably wg anyay) and eth0 by the proper network card (also eth0 probably).
    GL & HF
    JB

  • Can I get the Java version of mobile tv with the r...

    I would like to know how to get the Java version of mobile tv with the removed mobile tv application, so I can view the Sky EPG programme guide on my E90.
    Can anyone tell me how I can get it please. The version from sky will not work but reading other posts on here suggests that the java version might.
    Please help.
    Solved!
    Go to Solution.

    Sky have made it near impossible to get this application on current phones.
    Luckily for you the java version is available for download as part of this useful guide.
    The instructions are for the N95 but should work on an E90. I've got it working on an N82 and N96 at the moment.
    Just a note about the java app: It says it's for a sony but it works perfectly on a nokia. Not sure how it will look on the E90's big screen so if it doesn't work try the front screen.
    Message Edited by psychomania on 14-Nov-2008 10:42 AM

Maybe you are looking for

  • Updating on a tabular form

    hi, i have two extra column on my tabular form and one say 'UPDATED_BY" and the other says "DATE_UPDATED" i am trying to set the parameters so that every time someone adds a row to that column the system automatically displays the name of the user an

  • Want to add 2 fields in report ARXAGMW.rdf

    Hi, I want to add to fields in the report ARXAGMW.rdf. The fields are: - ps.trx_date transactiedatum, --transactiondate - ps.amount_due_original factuurbedrag, --transactionamount I changed the function below. I pasted not the whole code. But when i

  • I have a communication error between Lightroom 5 and my printer. It prints photos about 1/2 strength in color. Printer checks out ok. WHAT CAN I DO?

    I have a communication error between Lightroom 5 and my printer. It prints photos about 1/2 strength in color.. The printer checks out ok. What can I do?

  • Iphone 5 unable to make or receive calls.

    My Iphone 5 is not allowing me to make or receive calls. When I am making calls it comes up saying "Called Failed". I have restarted the phone a number of times and it works for an hour or so and then back to the same. No solid resolution. People are

  • "Finish" date

    Hello, PS 2010 I have some issues related with filed "Start" and "Finish" on task. 1. I create new task "Test", set "Start"to 01.01.2014 and "finish" to 31.12.2014. Save and Publish project. 2. Next I reported hours to "Test" task. As a project leade