Display problems with custom JComponent

I am having issues displaying two custom JComponents at the same time.
I have created a class which extends JWindow, and runs the following
code:
getContentPane().add(new CustomComponent(20,20));
getContentPane().add(new CustomComponent(120,20));
setSize(640,480);
setVisible(true);The class CustomComponent extends JComponent and has the following
method:
protected void paintComponent(Graphics g)
    g.fillOval(x,y,50,50);
}The problem is that only the second CustomComponent added is
displayed. When the following code is run, there is no problem:
getContentPane().add(new CustomComponent(20,20));
setSize(640,480);
setVisible(true);
getContentPane().add(new CustomComponent(120,20));
setSize(640,480);
setVisible(true);Note that BOTH setSize and setVisible must be run inbetween each
CustomComponent addition for them all to be displayed.
Can anybody shed any light on what's happening. I don't get this
problem when adding JLabel, so I guess it must be a problem with my
CustomComponent.
Thanks for your help.

Leaving it. Ok. This way you get a BorderLayout as default, which means that by adding both components without a position constraint, both are placed in the center position, probably overlaying each other.
Try setting the LayoutManager to null, and set both location and size on your custom components manually.

Similar Messages

  • Display Problem with my Mac Pro and LG Flatron Wide Monitor in Mountain Lion

    After upgrading to Mountain Lion, my Mac Pro has display problems with my LG Flatron display.  The image is displayed with a black bar on the right and on the bottom.  And the left side of the content is not visible.  I tried every resolution available in the Display System Preferences, they are different in terms of how big the black bars are, and what part is not visible, but none of them are correct.  I held down the option key to try to detect displays or switch to resolutions that are not normally available.  When I restart the image is lined up with the display, but if the display ever goes to sleep or gets turned off, the image reverts to being off center, and the only way I can get it back is to restart...  The interesting thing is that this monitor works fine with the same machine if I reboot using BootCamp into Windows 7.  The Monitor also works fine, connecting the same connector to a Mac Mini, although that mac mini is running 10.6 and not Mountain Lion.  I've reset the SMC and restarted countless times, I don't see any other levers to pull or things to try...

    That card is for a PC it may not give you Startup and Option-Boot screens.
    The 7950 "Mac Edition" card has a very distinctive look:
    http://www.sapphiretech.com/presentation/product/product_index.aspx?cid=1&gid=3& sgid=1157&pid=1777&psn=&leg=0&lid=1

  • External Display Problem with x301

    Hi everybody,
    I have a external display Problem with my x301.
    Ether direct attachment or via Lenovo USB Display Port  Device, the external monitor (22" Benq LCD) starts to flickr after a couple of minutes and the external display shuts off.
    Any ideas on this?
    Thanks a lot
    Chris 

    i have the same problem with X200 and the X200 ultrabay Docking station.
    No idea yet ...

  • Problem with custom paper size on dot matrix printer

    Hi All,
    I'm using CR2008 with updated to SP2. I have a problem with custom paper size (W=21; H=14), the CR Viewer show report with custom paper size correctly but when I print it to a dot matrix printer (Epson LQ 300+) the content was rotated to landscape. If print to a laser printer the content was printed correctly. My report was printed correctly by CR10 or previous versions I got this issue when upgraded to CR2008. I aslo tested my computer and printer with orther application like MS Word the printing have no problem with custom paper size.
    Thanks for any advice for me.
    Han

    Looking at the Epson LQ 300+ driver, I see that the latest update is from 2002. In my experience, most matrix printer drivers are not unicode. Crystal Reports is designed to only work with unicode printer drivers. See the [How Printer Driver Options Affect a Report|https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/a09051e9-721e-2b10-11b6-f9c65c64ef29&overridelayout=true] article, page 6 for details. Also, see [this|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] note.
    Finally, see if you can print from the CR designer to this printer and if you get the correct results here.
    Ludek

  • Problems with Custom Paper Size and Address Book

    I'm having some trouble printing from Address Book onto a custom paper size. I'm attempting to set up a notecard, and only print one at a time, rather than multiple columns as in the Labels option. The trouble is that when creating this small size, Address Book doesn't recognize it as anything other than a regular sheet of US Letter, and thus prints the address in the middle of the page.
    I have no problem printing envelopes, though, which seems odd because they too go in the manual feed for my printer. The notecards are similar width to the envelopes, but only about half the length.
    Has anyone else experienced problems with custom paper sizes printing improperly? I'm using an HP 4515 LaserJet, but have access to a few other laser printers. Thanks for any insight

    I have had the same problem, and with the same result; Adobe Tech Support can't help or fix, after 15 hours on phone, Level 2 support. It is a software bug Adobe has, and can't seem to fix.  I just upgraded to Lightroom CC, and my problem migrated with the upgrade.  I print in Photoshop fine.
    If you found an answer, I would appreciate  knowing how to do it!
    Thanks

  • Problems with custom buttons

    I have problems with custom buttons in Captivate 5. The button is not switching from the _up stage to _over stage, but when I click on it the _down stage works fine. It is not a problem with the naming of the buttons. They are all with the same name and in lower case. I have tried with various custom buttons and the problem is the same. There is no problems with the standard buttons from the Adobe Gallery, so it is a bit strange, also strange that it is only the _over stage that causes problems.
    The buttons I have made in Adobe Illustrator. Have tried both exporting in png and bmp format. It is the same problem.
    Hope someone has some idea as to what can be wrong.

    Hi Manish,
    I have uploaded the zip file with the button files to Acrobat and mailed you the link.
    Look forward to hear if you find a reason or more importantly a solution :-)
    Kind regards
    Rene

  • Display problems with Kwin on intel hardware

    Hi all,
    Since the latest update of xorg and intel drivers, I have a display problem with kwin's expose-like feature. Before I file a bug,
    - Is anyone experiencing the same problem? Do you have a workaround?
    - Does anyone know what could be at fault?

    lardon wrote:
    panosk wrote:Indeed... If you want to fill a bug report right now go ahead, otherwise I have to get to my laptop in a few hours to check logs and post a report then. BTW, could you also try Ctrl+F11 and rotate the cube for a while? You should notice some flashes and very bad performance, even with direct rendering.
    I will, and I hope you'll contribute your logs to the bug report! The question is where to submit it: I'm pretty sure the bug is upstream, but is it a kwin bug or an xorg/intel bug?
    Ctrl+F11 works "fine" on my system, even though it crashed kwin the first time I tried it :-)
    Well, that's a very tough question! I was thinking to fill a bug report in Arch's bugtracker, although I also think it is an upstream bug. Problem is, after reading this http://blog.martin-graesslin.com/blog/2 … paces-4-5/ and this http://www.itnewstoday.com/?p=1803, one can realize the absolute *Mes(s)a * that dominates the whole graphics stack....

  • Tty display problems with nvidia and uvesafb

    I'm trying to get my console to display correctly at 1080p; trying to do so through GRUB was always an absolute nightmare.
    The console displays fine with nouveau, but nouveau causes the infamous pink line bug, which is simply too irritating to ignore; nouveau is not an option.
    In the past, my console has run at low res and incorrect scale with nvidia, but I've ignored the problem since I prefer to use a virtual terminal in X.
    Now, if possible, I need to use the actual console for the purposes of module development.
    I installed v86d and uvesafb and configured the console for 1920x1080 and 32 bit depth.
    The console is displaying with the correct resolution now, but is surrounded by a black border, making the font distorted and extremely difficult to read.
    How can I get my console to scale correctly to fullscreen? Any ideas at all. I found nothing in the forums or wiki, and I'm out.
    I'm fairly certain there are no vga or video settings in GRUB that are interfering.

    Output of "pacman -Qi nvidia"
    Name : nvidia
    Version : 343.36-2
    Description : NVIDIA drivers for linux
    Architecture : x86_64
    URL : http://www.nvidia.com/
    Licenses : custom
    Groups : None
    Provides : None
    Depends On : linux>=3.17 linux<3.18 nvidia-libgl nvidia-utils=343.36
    Optional Deps : None
    Required By : None
    Optional For : None
    Conflicts With : None
    Replaces : None
    Installed Size : 5.30 MiB
    Packager : Felix Yan <[email protected]>
    Build Date : Thu 11 Dec 2014 08:32:19 AM CST
    Install Date : Fri 12 Dec 2014 12:10:32 AM CST
    Install Reason : Explicitly installed
    Install Script : Yes
    Validated By : Signature
    Output "cat /boot/grub/grub.cfg"
    # DO NOT EDIT THIS FILE
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    ### BEGIN /etc/grub.d/00_header ###
    insmod part_gpt
    insmod part_msdos
    if [ -s $prefix/grubenv ]; then
    load_env
    fi
    if [ "${next_entry}" ] ; then
    set default="${next_entry}"
    set next_entry=
    save_env next_entry
    set boot_once=true
    else
    set default="0"
    fi
    if [ x"${feature_menuentry_id}" = xy ]; then
    menuentry_id_option="--id"
    else
    menuentry_id_option=""
    fi
    export menuentry_id_option
    if [ "${prev_saved_entry}" ]; then
    set saved_entry="${prev_saved_entry}"
    save_env saved_entry
    set prev_saved_entry=
    save_env prev_saved_entry
    set boot_once=true
    fi
    function savedefault {
    if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
    fi
    function load_video {
    if [ x$feature_all_video_module = xy ]; then
    insmod all_video
    else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
    fi
    set menu_color_normal=green/black
    set menu_color_highlight=black/green
    if [ x$feature_default_font_path = xy ] ; then
    font=unicode
    else
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 337acc84-0300-43b1-b426-79391d39e898
    else
    search --no-floppy --fs-uuid --set=root 337acc84-0300-43b1-b426-79391d39e898
    fi
    font="/usr/share/grub/unicode.pf2"
    fi
    if loadfont $font ; then
    set gfxmode=auto
    load_video
    insmod gfxterm
    set locale_dir=$prefix/locale
    set lang=en_US
    insmod gettext
    fi
    terminal_input console
    terminal_output gfxterm
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 337acc84-0300-43b1-b426-79391d39e898
    else
    search --no-floppy --fs-uuid --set=root 337acc84-0300-43b1-b426-79391d39e898
    fi
    insmod png
    background_image -m stretch /boot/grub/archgrub.png
    if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
    # Fallback normal timeout code in case the timeout_style feature is
    # unavailable.
    else
    set timeout=5
    fi
    ### END /etc/grub.d/00_header ###
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-337acc84-0300-43b1-b426-79391d39e898' {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 337acc84-0300-43b1-b426-79391d39e898
    else
    search --no-floppy --fs-uuid --set=root 337acc84-0300-43b1-b426-79391d39e898
    fi
    echo 'Loading Linux linux ...'
    linux /boot/vmlinuz-linux root=UUID=337acc84-0300-43b1-b426-79391d39e898 rw quiet
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux.img
    submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-337acc84-0300-43b1-b426-79391d39e898' {
    menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-337acc84-0300-43b1-b426-79391d39e898' {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 337acc84-0300-43b1-b426-79391d39e898
    else
    search --no-floppy --fs-uuid --set=root 337acc84-0300-43b1-b426-79391d39e898
    fi
    echo 'Loading Linux linux ...'
    linux /boot/vmlinuz-linux root=UUID=337acc84-0300-43b1-b426-79391d39e898 rw quiet
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux.img
    menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-337acc84-0300-43b1-b426-79391d39e898' {
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 337acc84-0300-43b1-b426-79391d39e898
    else
    search --no-floppy --fs-uuid --set=root 337acc84-0300-43b1-b426-79391d39e898
    fi
    echo 'Loading Linux linux ...'
    linux /boot/vmlinuz-linux root=UUID=337acc84-0300-43b1-b426-79391d39e898 rw quiet
    echo 'Loading initial ramdisk ...'
    initrd /boot/initramfs-linux-fallback.img
    ### END /etc/grub.d/10_linux ###
    ### BEGIN /etc/grub.d/20_linux_xen ###
    ### END /etc/grub.d/20_linux_xen ###
    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###
    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f ${config_directory}/custom.cfg ]; then
    source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
    source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    ### BEGIN /etc/grub.d/60_memtest86+ ###
    ### END /etc/grub.d/60_memtest86+ ###
    Output "cat /usr/lib/modprobe.d/uvesafb.conf"
    Video mode is set as "1920x1080-32".
    # This file sets the parameters for uvesafb module.
    # The following format should be used:
    # options uvesafb mode=<xres>x<yres>[-<bpp>][@<refresh>] scroll=<ywrap|ypan|redraw> ...
    # For more details see:
    # http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/fb/uvesafb.txt
    options uvesafb mode_option=1920x1080-32 scroll=ywrap
    This file is mirrored in /etc/modprobe.d/uvesafb.conf.
    Running "diff /usr/lib/modprobe.d/uvesafb.conf /etc/modprobe.d/uvesafb.conf" returns no output.
    Output of "cat /sys/class/graphics/fb0/virtual_size" is solely "1920,1080".
    ---edit---
    Output of "cat /etc/default/grub" in case it's helpful.
    GRUB_DEFAULT=0
    GRUB_TIMEOUT=5
    GRUB_DISTRIBUTOR="Arch"
    GRUB_CMDLINE_LINUX_DEFAULT="quiet"
    GRUB_CMDLINE_LINUX=""
    # Preload both GPT and MBR modules so that they are not missed
    GRUB_PRELOAD_MODULES="part_gpt part_msdos"
    # Uncomment to enable Hidden Menu, and optionally hide the timeout count
    #GRUB_HIDDEN_TIMEOUT=5
    #GRUB_HIDDEN_TIMEOUT_QUIET=true
    # Uncomment to use basic console
    GRUB_TERMINAL_INPUT=console
    # Uncomment to disable graphical terminal
    #GRUB_TERMINAL_OUTPUT=console
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    GRUB_GFXMODE=auto
    # Uncomment to allow the kernel use the same resolution used by grub
    #GRUB_GFXPAYLOAD_LINUX=keep
    # Uncomment if you want GRUB to pass to the Linux kernel the old parameter
    # format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
    #GRUB_DISABLE_LINUX_UUID=true
    # Uncomment to disable generation of recovery mode menu entries
    GRUB_DISABLE_RECOVERY=true
    # Uncomment and set to the desired menu colors. Used by normal and wallpaper
    # modes only. Entries specified as foreground/background.
    GRUB_COLOR_NORMAL="green/black"
    GRUB_COLOR_HIGHLIGHT="black/green"
    # Uncomment one of them for the gfx desired, a image background or a gfxtheme
    GRUB_BACKGROUND="/boot/grub/archgrub.png"
    #GRUB_THEME="/path/to/gfxtheme"
    # Uncomment to get a beep at GRUB start
    #GRUB_INIT_TUNE="480 440 1"
    #GRUB_SAVEDEFAULT="true"
    Also, it might help to describe the behaviour more specifically / more in depth...
    The rendered part of the console occupies the same space as the GRUB boot menu.
    I installed and configured virtualbox a few weeks previously.
    I ran "sudo depmod -a" as the wiki / forums indicated it could remedy problems with virtual machines failing to start.
    It did fix the virtualbox problem; after reboot, suddenly lightdm *also* initally occupied the same window space as grub.
    That was new behaviour. When I logged in to xmonad, the desktop displayed similarly to GRUB.
    I hadn't tried fixing it; logging in with root followed by "ps -e | grep X" and "kill -9 <Xpid>" caused X as a whole to start behaving and scaling normally.
    I haven't rebooted until attempting to rectify the issue with my console.
    The oddity with scaling in lightdm and xmonad still shows up after reboot and is still reparable by killing X.
    Killing X doesn't - obviously - have any effect on console scale.
    ---/edit---
    d(-_-)
    Last edited by seppukuzushi (2014-12-31 14:01:23)

  • Display Problem in Custom Infotype

    Hello Experts,
                          A problem is being encountered in the display of data using the overview icon for a custom infotype. When we enter data through transaction PA30, we are able to see data as per the date validities when the user clicks on display icon. But when the Overview button is clicked, the data is not being displayed properly.
    The following comments were logged with the following dates.
    02.12.2007 31.12.9999 - Comment 1
    14.11.2006 30.11.2006 - Comment 2
    01.01.2006 13.11.2006 - Comment 3.
    when the same is observed using Overview icon, data is not being diaplyed properly.
    Any help would be greatly appreciated.
    Thanks
    Srinivas.

    Hi Sankhadip,
                           Thanks for your reply. The problem is in my Custom IT9005. The time constraint of the infotype is 2. I am using LSMW to upload data. I am not having any problem with loading data as of now, but its only wit the overview icon, its not updating properly.. Please help me with this. Thanks again for your response.
    Srinivas.

  • Two problems with custom kernel

    I get two problems with my custom kernel that is not using initrd and otherwise working fine:
    1) initscripts does not print anything, i.e., I see the kernel messages and after a short while the login prompt. It seems to start the daemons, however, since my network is working. During shutdown the printout is working as usual.
    2) the machine does not power off properly (just hangs/stops after saying that is now powers off).
    I am missing some kernel options? Or do I have to configure something differently for not having an initrd?
    Thanks,  CC

    ccom wrote:I now re-compiled with Arch Linux's default settings (except for SCSI, SATA, and filesystem drivers built in) and noinitrd in GRUB. I get the same two problems. What is initrd doing that I missed?
    how about display drivers? are you compiling them in the kernel or as external modules?

  • Problems with custom authentication when migrating from 3.2 to 4.1.1

    Hi,
    we’re about to upgrade our APEX instances to 4.1.1 and to migrate our applications. I encountered some problems with our custom authentication schema.
    1.     Recognize already authenticated sessions: in 3.2 the sentry function could return false as long as the user was not authenticated. Public pages could still be displayed (including the login page). The result of the function apex_custom_auth.is_session_valid returned false until once the sentry function returned true. How can I recognize non authenticated sessions in 4.1.1? I looked for the test the Condition “User is the public user (user has not authenticated)” computes on a page but didn’t found the right one. It’s not what docu states here (comparison with the public user): http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/condition001.htm#HTMDB25943. I replaced the test with p_authentication.username = ‘nobody’. It works. But that doesn’t seem to me to be the right way …
    2.     Post_logout lacks session context: the Post Logout Procedure does not receive a session_id and username. Neither the V(‘APP_SESSION’) nor p_authentication.session_id are set. This applies to both plugin authentication schemes and non-plugin custom authentication schemes. Is there another way to obtain the logged-out sessions infos or is this a bug?
    See apex.oracle.com for a demo, workspace WS_MW, gast/gast. Can someone please guide me the way?
    Michael

    Hello again,
    there are no replies until now .... I reviewed some posts regarding custom authentication again and did not find any solution for the issues. Found some that worked with APEX 3.2.1 but not with 4.1.1. I can only work around
    1.) in an insecure way, because the non documented (?) user "nobody" can change and all new sessions will be considered authenticated
    2.) in a way, that ends up in implementing the logout from the non apex environment outside the authentication schema or authentication plugin.
    May be I should contact support for at least the second issue because this doesn't work as documented or am I doing something wrong?
    Michael

  • Problem with custom navigation bar

    I'm trying to create a custom left navigation bar with adaptive tag. when user click on the link it will direct to a pagelet which is created with page template. How can I do it? I don't understand what is pt:objectid? Where can I look for answer? I just need a simple example. Thank you.

    You can get the object id from the "Edit this Community" feature under "My Communities" then look in "properties and names". If you look in the address bar you could also see the objid in there (objId=1234). I was having problems with this too.
    What I did was use the ptdata tag like this:
    <div id="topNav">
    <pt:ptdata.currentcommunityiddata pt:id="currcomm" />
    <pt:ptdata.subcommunitiesdata pt:commid="1234" pt:id="subcommunityPages" />
    <ul>
    <pt:standard.choose>
    <pt:standard.when pt:test="isMatch" pt:str1="$currcomm.objid" pt:str2="3217">
    <li class="down">
    </pt:standard.when>
    <pt:standard.otherwise>
    <li>
    </pt:standard.otherwise>
    </pt:standard.choose>
    <pt:standard.openerlink pt:objectid="3217" pt:classid="512" pt:mode="2">Home</pt:standard.openerlink>
    </li>
    <pt:logic.foreach pt:data="subcommunityPages" pt:var="varCommunityPage">
    <pt:standard.choose>
    <pt:standard.when pt:test="isMatch" pt:str1="$currcomm.objid" pt:str2="$varCommunityPage.objid">
    <li class="down">
    </pt:standard.when>
    <pt:standard.otherwise>
    <li>
    </pt:standard.otherwise>
    </pt:standard.choose>
    <pt:core.html pt:tag="a" href="$varCommunityPage.url" title="$varCommunityPage.title">
    <pt:logic.value pt:value="$varCommunityPage.title"/>
    </pt:core.html>
    </li>
    </pt:logic.foreach>
    </ul>
    </div></p>
    <p>This is for a community that has subcommunities. you could also do the same thing with pages instead.
    Short explaination:
    This line sets up a data object for the current community data and assigns it the variable name "currcomm":
    <pt:ptdata.currentcommunityiddata pt:id="currcomm" /></p>
    <p>This line gets the subcommunities for a particular community (in this case commid="1234" ). You specify which community with the pt:commid.
    <pt:ptdata.subcommunitiesdata pt:commid="1234" pt:id="subcommunityPages" /></p>
    <p>I used a <ul> for it but you could really do it any way you want.</p>
    <p>I added a static "home" tab that will always link to my top level page of the community. this is optional and there may be a better way of doing it:
    <pt:standard.choose>
    <pt:standard.when pt:test="isMatch" pt:str1="$currcomm.objid" pt:str2="3217">
    <li class="down">
    </pt:standard.when>
    <pt:standard.otherwise>
    <li>
    </pt:standard.otherwise>
    </pt:standard.choose>
    <pt:standard.openerlink pt:objectid="3217" pt:classid="512" pt:mode="2">Home</pt:standard.openerlink>
    </li></p>
    <p>for a link to your page you can use this tag. You can get both the objectid and classid from the "properties and names" page as mentioned above. pt:mode is how/what should be displayed (The action of the link (Opener mode). 1 = Open, 2 = View, 3 =ViewMeta.)
    <pt:standard.openerlink pt:objectid="3217" pt:classid="512" pt:mode="2">
    I also have a choose in there to test if the current community you're in is the same as the community of the link. That lets me add a class="down" for a down state. </p>
    <p>This loops through all the subcommunities and builds a link in this format <li>TITLE OF COMMUNITY</li>. </p>
    <p><pt:logic.foreach pt:data="subcommunityPages" pt:var="varCommunityPage">
    <pt:standard.choose>
    <pt:standard.when pt:test="isMatch" pt:str1="$currcomm.objid" pt:str2="$varCommunityPage.objid">
    <li class="down">
    </pt:standard.when>
    <pt:standard.otherwise>
    <li>
    </pt:standard.otherwise>
    </pt:standard.choose>
    <pt:core.html pt:tag="a" href="$varCommunityPage.url" title="$varCommunityPage.title">
    <pt:logic.value pt:value="$varCommunityPage.title"/>
    </pt:core.html>
    </li>
    </pt:logic.foreach>
    </p>
    <p>Hopefully that is what you're trying to do.
    Like I said, you can use the same process for pages instead of subcommunities by using the communitypagesdata tag instead of subcommunitiesdata. You could also combine the two and list all the subcommunities with a foreach loop and inside each loop get the pages from the communitypagesdata with the commid set to the subcommunity objid for that subcommunity.</p><p>
    THis document is very helpful with PT tags... [url http://e-docs.bea.com/alui/devdoc/docs60/References/API_Libraries/TagDocs/index.html]http://e-docs.bea.com/alui/devdoc/docs60/References/API_Libraries/TagDocs/index.html</p>
    -Matt
    Edited by thelimpingtoad at 03/14/2008 5:55 AM

  • Problems with Customer Service AND unexplained charges!

    I've been with Verizon for I-don't-know-how-many years, and through the years you are bound to have a few problems here and there but some of the problems are just ridiculous! It's also the same reocurring problem!!!!!!!!!!!!!!!! I was with Alltel first, before it was bought out by Verizon. The years I was with Alltel, I didn't have near as many problems. It seems EVERY time I do the smallest change or something to my phone or bill, I get a ridiculous amount of charges that I was NOT aware of, nor told about... EVEN IF I ask "So this isn't going to change my bill, or there will not be any unexpected/unexplained charges that I don't know about?"... BUT not matter how many times I ask... and NO matter how many times I am told "no"... there always is. For example.... last year, I updated and signed a new 2 year contract and purchased the first Driod. Before, my 30 day warranty was up, I was having problems with my Driod, and decided to send it in and get a new one. Before I did this.. I called customer service to make sure there would be no interuption in my bill, and there wouldn't be any unexpect charges, and there would be no difference in anything. I was told there was not, and once I recieved my new phone, just send it in and nothing would be changed. Of course, when I get my bill.. I see I was charged $500 for the new phone. It was explained to me that my credit card was reimbursed (which I never check that card, because I never used it expect to purchase the phone) and that I was recharged for the new phone, since it was a new phone. So I had to fork out the $500 (on top of my bill) and then wait months to get the $100 rebate card. Months after that, I "assumed liablity of my line" because I was on a plan with my family. I decided to have my own line, so I "assumed liability." I was not told that when I did that, I "renewed" my contract date. So I just added 6 more months to my 2 year contract. Was NOT told about that! Then again...... I was recently having problems with my Driod (the screen went black and would not come back on.) I had to turn on an OLD motorola razor, so I would not be without a phone for two days while I was waiting on my phone to come in. As soon as my phone came in, I had my Droid turned back on. I recieved my bill recently, and my bill was $200 over what it normally should be.... so I called in... apparently, when I had my phone replaced, they dropped off my data package and when I recieved my replacement driod, they never put it back on. So I was being charged for alllll my data usage... again I was NOT told about this. I wasn't even aware that they had dropped off my data package, and when/where did they get the authority to do that??? These are just a FEW of the problems that I have had.................................
    Does anyone have these reoccuring problems!?

    I understand that my bill can be viewed online, and I do view it fairly regularly, so if there are any unexplained charges, I can call Verizon asap. The problem does not come from me not understanding my bill, but from customer service. I have been with Verizon for a very long time, and it is a continuing problem. Where did Verizon get the 'OK' to drop my data package off my plan? Who authorized that?
    After calling Verizon and trying to find out the problem, the gentleman told me that when I activated on old phone while I was waiting on my new Droid to arrive, my data package was dropped off and I "should" have been told about that. When I reactiviated my new Droid, I "should" have called and had them restart my data package. I was not aware that when you activate an old phone that data plan is taken off your plan. In all my years of having cell phones, I never make two years with one phone. I have always, at one point, had to turn on an old phone, and my data package has NEVER changed. Why would I have my data package dropped and why would I have to call Verizon to have it restarted. I would never know to do that unless I was TOLD that my data packaged HAD to be re-added when I recieved my new phone, but I was never told of that.
    All of that is beside the point, the point is, Verizon was never given the authorization to change my plan. Never. My bill was taken care of and readjusted, and I am thankful for that. It does not change the fact it is always a hassle with Verizon Customer Service and I am always the one having to PROVE that I am not at fault, or that I was NEVER told of certian things. EVERY TIME I HAVE CALLED CUSTOMER SERVICE, I AM TOLD "I'M SORRY, THEY SHOULD HAVE TOLD YOU THAT."
    "they should" does not help my bill with the extra armount of charges.

  • Problem with custom form

    Hey All,
    Has anyone ever experience a problem with maximizing or resizing their custom form? I have a rather large form that every time I try to maximize or resize causes Business One to hang and crash.
    Any ideas what might be causing this?

    Hi Curtis,
    Thanks for posting the solution... will keep it in mind!
    Thanks,
    Adele

  • Display Problem with RowHeader of a Scroll Pane

    Hi,
    I am trying to display row headers for a table using another table
    Here is the code
    import javax.swing.*;
    import javax.swing.table.*;
    public class RowNumberHeader extends JTable {
      protected JTable mainTable;
      public RowNumberHeader(JTable table) {
        super();
        mainTable = table;
        setModel(new RowNumberTableModel());
        setRowSelectionAllowed(false);
        JComponent renderer = (JComponent)getDefaultRenderer(Object.class);
      public int getRowHeight(int row) {
        return mainTable.getRowHeight();
      class RowNumberTableModel extends AbstractTableModel {
        public int getRowCount() {
          return mainTable.getModel().getRowCount();
        public int getColumnCount() {
          return 1;
        public Object getValueAt(int row, int column) {
          return new Integer(row + 1);
    }and then
            JTable displayTable = new JTable(...);
            scrollPane = new JScrollPane(displayTable);
            JViewport jvp = new JViewport();
            jvp.setView(new RowNumberHeader(displayTable));
            scrollPane.setRowHeader(jvp);the problem I have is that when a row is selected inside the row header, some rows go blank and you can see the selection is all screwed up. I tried setting the selection mode to ListSelectionModel.SINGLE_SELECTION but that didn't help.
    A refresh of the entire screen (minimize/maximize) seems to resolve the problem. I am using jdk1.4.1 in Windows 2000.
    Any ideas?
    Sylvain

    Again the problem is that when you click on the row headers, some row header rows go blank (completely white) so you can't see what they show.
    ie say I have table
    Row 1 - 1  2  3
    Row 2 - 2  4  5
    Row 3 - 5  7  7
    Row 4 - 5  6  7where Row X is the row header. So for example, if you click on Row 2, you will get something like
    Row 1 - 1  2  3
    Row 2 - 2  4  5
          - 5  7  7
    Row 4 - 5  6  7until the screen is refreshed or you click some other row header.
    hmm ok, I added calling repaint on the table whenever a row is selected and at least the display problem goes away; however, the selected indexes from the event don't always match the index of the row selected. I think actually that may be the source of the display problem.
    Here is the code I added in the constructor:
            getSelectionModel().addListSelectionListener(new ListSelectionListener()
                public void valueChanged(ListSelectionEvent e)
                    System.out.println("Header table selection is: First = " + e.getFirstIndex() +
                                       " Last = " + e.getLastIndex());
                    RowNumberHeader.this.repaint();
            });

Maybe you are looking for