Swing Component faded out

Hi,
Is it possible to make a make a component in Swing faded out and not selectable?
I have a JTabbedPane and I want to specify at loading time how many tabs should be selectable and the other ones should be visible but not selectable.

Hi,
I found the solution.
The method setEnabledAt can set this.

Similar Messages

  • Hotel Menu Like Swing Component

    Hi , I need a swing component which has the functionality as below
    Initially, its looks like this
    # Beverages
    # Starters
    # MainCourse
    # Deserts
    When the user clicks on > it should expand that menu item and show the individual items along with their icons.
    # Beverages
           icon1 Tea
           icon2 Ice Tea
           icon3 Soft drink
    # Starters
    # MainCourse
    # Deserts
    Is there any readily available swing component which I can use for this behavior ?
    It is ok even the swing component misses out expand functionality when the "#" is clicked.

    But how can I set the icons to what I need ? Read the tutorial!!!
    There is no way you could have read the tutorial and understand how a JTree works in 10 minutes.
    So do some work on you own. Read the tutorial. Search the forum for examples.
    We've pointed you in the right direction so do some learning on your own.

  • Help-using document as a java swing component

    Hi,
    can i use a document excel file or a doc file as a swing component.
    i have few templates in in excel and .doc format.
    i use them to produce bills by just entering data.
    Now i want to develop a swing application and use the same templates in jpanel or jtextpane or jeditorpane.
    its very hectic to make templates in swing using tables and all.
    is there any api which can help me out???
    thanks

    as a Swing component? No.
    There's probably libraries for reading those types of files, and maybe displaying them. POI, perhaps?

  • Swing component's margin in a frame

    Hello all,
    When you set the bounds of a Swing component in a frame, it will automatically apply those bounds to the VISIBLE part of the frame, so that, a Y value of 0, for example, will not be at the very top of the frame, but right underneath the title bar of the frame. If you give a regular AWT a value of 0 to it's Y coordinate, part (or all) of it will be covered by the title bar of the frame. This does not happen with Swing components, which automatically add the height of the title bar to the value you give to their Y coordinate.
    Now, what I want to know is, how can I retrieve the value of that "automatic margin"?. How can I know the number of pixels that the Swing component is being slided down, in order to save the title bar of the frame? This value can not be constant, since it will differ from one platform to another, and from one Look 'n Feel to another, but I have not been able to find out the way to get the value that it's being applied in each case.
    As allways, many thanks in advance for your help.

    Don't know if there is any direct way to get this information. But, assuming the border width/height is equal on all four sides you could try something like:
    Dimension frameD = frame.getSize();
    Dimension contentD = frame.getContentPane().getSize();
    int borderWidth = frameD.width - contentD.width;
    int titleHeight = frameD.height - contentD.height - borderWidth;

  • Support for Multilingual Numeral Input in JTextField swing component

    When the User Locale is changed from the regional & language options in the control panel and the standard digits are customized to a non Latin character set, all the windows applications adhere to the changes made. HTML also respects the changes in effect and displays any numeric values using the new character set, which are the national digits for many Eastern Locales such as Chinese, Arabic(Saudi Arabia), Urdu and many more. The JTextField swing component given by java, however, does not show any support to the new settings. Any numeric input is displayed in the Latin character set even when the input locale of the system is also changed respectively. Any text input for this case is correctly displayed in the desired literals and appropriate glyphs. However, unlike the AWT components, numeral input and display is not catered as per the user/developer's requirements. This behavior was first noticed in 2007, as far as i have found out, and was reported once again on the same thread in 2010. The thread is given below as a reference. No action or response has been taken. Kindly look into this matter and please let me know if this bug has been reported before and if there is any intent of providing a fix for it.
    Reference: http://www.coderanch.com/t/344075/GUI/java/Multilingual-support-JTextField
    Regards,
    Aitzaz Ahmad
    Software Engineer
    SENSYS

    I too had an itch to reply with something like this
    This is a sign of work well done!
    The WD has so strong UI abstraction, that hides client-server nature applications almost completely. If you search forum, you will even find posts where developers try to upgrade value of ProgressMeter in <b>for</b> loop )
    VS

  • Can't add to JPanel after removeAll() is triggered by another swing compone

    Consider the bit of code below. It's a much simplified version of my real app.
    In jPanel1 is a single label. In jPanel2 is a single button.
    The button in jPanel2 is supposed to wipe clear (with removeAll()) jPanel1 and add a new label in place of the old one. What actually happens is that after the first button press, jPanel1 is indeed cleared by the removeAll() method but the new label can't be added (or rather it can be added but won't show.) I can hard code the removal & addition back and forth all day & it works fine. It's just when I use a swing component like JButton or JComboBox that it doesn't work. Why?? Is this a thread thing? (I know I can just change the text of the label but the real app is much more complicated.)
    package my.stuff;
    import java.awt.*;
    import javax.swing.*;
    public class TreeTest3 extends javax.swing.JFrame {
         private String language = "english";
         public TreeTest3() {
              initComponents();
              jPanel1.setLayout(new FlowLayout());
              jPanel1.setVisible(true);
              changeLabel();
         private void changeLabel()
              System.out.println("language = " + language);
              jPanel1.removeAll();
              jPanel1.validate();
              jPanel1.add(new JLabel(language), "Center");
              repaint();
         @SuppressWarnings("unchecked")
            // <editor-fold defaultstate="collapsed" desc="Generated Code">
            private void initComponents() {
                    jPanel1 = new javax.swing.JPanel();
                    jPanel2 = new javax.swing.JPanel();
                    jButton1 = new javax.swing.JButton();
                    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
                    jPanel1.setBorder(new javax.swing.border.MatteBorder(null));
                    jPanel1.setPreferredSize(new java.awt.Dimension(400, 204));
                    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
                    jPanel1.setLayout(jPanel1Layout);
                    jPanel1Layout.setHorizontalGroup(
                            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGap(0, 398, Short.MAX_VALUE)
                    jPanel1Layout.setVerticalGroup(
                            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGap(0, 133, Short.MAX_VALUE)
                    jButton1.setText("switch");
                    jButton1.addActionListener(new java.awt.event.ActionListener() {
                            public void actionPerformed(java.awt.event.ActionEvent evt) {
                                    jButton1ActionPerformed(evt);
                    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
                    jPanel2.setLayout(jPanel2Layout);
                    jPanel2Layout.setHorizontalGroup(
                            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(jButton1)
                                    .addContainerGap(308, Short.MAX_VALUE))
                    jPanel2Layout.setVerticalGroup(
                            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(jButton1)
                                    .addContainerGap(126, Short.MAX_VALUE))
                    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
                    getContentPane().setLayout(layout);
                    layout.setHorizontalGroup(
                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    layout.setVerticalGroup(
                            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    pack();
            }// </editor-fold>
         private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
              if (language.equals("english")) language = "spanish"; else language = "english";
              changeLabel();
         public static void main(String args[]) {
              java.awt.EventQueue.invokeLater(new Runnable() {
                   public void run() {
                        new TreeTest3().setVisible(true);
            // Variables declaration - do not modify
            private javax.swing.JButton jButton1;
            private javax.swing.JPanel jPanel1;
            private javax.swing.JPanel jPanel2;
            // End of variables declaration
    }

    It should be
                    private void changeLabel()
              System.out.println("language = " + language);
              jPanel1.removeAll();
              jPanel1.add(new JLabel(language), "Center");
              jPanel1.revalidate();
              jPanel1.repaint();
         }

  • All of my music that wasn't purchased from the itunes store has been faded out on my ipod, despite me being able to play them in itunes. half my songs have exclamation points but only in the 'on this ipod' section, and when i double-click no window appear

    I'm freaking out because almost all my music except for those songs purchased directly from the iTunes store has been deleted from my iPod - about 35 gigs. The songs show up, but they're all faded out and unplayable from my device (I have the newest version). Exclamation points appear beside all my songs in the "On this iPod" section, and yet I can't double-click to locate the files as nothing pops up. Some of my music has a weird circle next to it and is even more faded out when I'm in the "On this iPod" section - that's been happening for a couple of days. Yesterday I tried to set my settings to sync with my library only, and it worked, but this morning everything got even worse with the rest of my songs disappearing. What's happening???? Help??

    The syncing of music is one way, computer to phone. See this helpful document from a fellow user. Credit goes to the author.
    https://discussions.apple.com/docs/DOC-3141

  • HT1386 I synced (updated) my iphone to itunes and some songs were deleted from my iphone playlist on my phone.  On the computer, a circle is next to the song and the title faded out.  What the heck is that all about and how do I get my songs back onto my

    I synced (updated) my iphone to itunes and some songs were deleted from my iphone playlist on my phone.  On the computer, a circle is next to the song and the title faded out.  What the heck is that all about and how do I get my songs back onto my phone playlist?  Never happened before.  My software is up to date?

    http://support.apple.com/kb/HT2519

  • Is there a COMPONENT video OUT solution for the iBook?

    I am currently using Apple's Video Adapter (mini-VGA to S-Video) to hook up to my widescreen. Let's face it, S-Video *****. I am trying to find a solution that would allow me to get component video out of my iBook and run that into my widescreen.
    Is there a VGA->Component Video Adapter available that would work with the mini-VGA -> VGA adapter that ships with the iBook? (Or some other way to get a component video signal?)
    Thanks!
    iBook G4 1.2GHz   Mac OS X (10.4.3)   1.25 GB RAM

    Hi Mactivist,
    i am not an expert on this video stuff but I think
    you might find this useful. Although the
    procedure described is about a Mac Mini (which has a
    dvi connector) the guy actually used a DVI-VGA
    adapter. Therefore, I believe, the set-up described
    should work for you too.
    -Petra
    Unfortunately, iBooks do not have DVI out. What I really need is a VGA to Component video adapter.
    And for the person who wasn't sure what a component video cable looks like, this is a cable that has 3 rca-like plugs on it, each one supplies a different color (RGB I think).
    So far, I've not found a VGA adapter that can do this unless you are using an ATI video card as the source.
    iBook G4 1.2GHz   Mac OS X (10.4.3)   1.25GB RAM

  • My ipad has just faded out and i need it for highschool what do i do

    my ipad has just faded out and i need it for highschool .
    ITS JUST WENT BLANK
    WHAT DO I DO

    Hold the power and home button down till u see the apple logo. Do you have ur stuff saved into iCloud?

  • Problem with fading out particles in cs5

    I have a problem with fading out particles or anything for that matter in my CS5 after effects!  I set up the key frames right.  O opacity at first and whatever number at next and it fades in fine,  But when I try to do the reverse it will not fade out and only stops the effect if I cut its durration at the red par representing it on the top of the time line. This produces and rough aburpt cut of the effect which will not due.  Please can anyone tell me what I am doing wrong that I can't fade out particles with opacity?

    First question: What OS and what's the build of CS5.5?
    Second question: What effect are you using? There are a bunch of ways to generate particles.
    Last question: if you turn off the effect can you get the layer to fade out? Pressing Alt/Option + t will set a keyframe for opacity on your layer and reveal the keyframe in the time line. Do that, set the value to 0, then move down the timeline a few frames and set the value to 100. This should generate another keyframe. Now move down a few more frames and press Alt/Option + t or change the value for opacity to anything and then back to 100, or copy the previous keyframe and paste to set a 3rd keyframe. Finally move down a few more frames and set the value to 0. You should have 4 keyframes in your tlimeline for opacity. If you want to clean up the layer press Alt/Option + ] to set the out point for the layer.
    Everything should work just fine. Turn on the effect and your layer and the effect should fade out.
    If you want to do something else with the particles, like fade out a particle over the lifetime of the particle we'll need to know which plug-in you're using.

  • UIImageView not fading out as it should in the simulator?

    i am using an animation block to fade out a view. fading in works perfectly, however fading it out does not. it waits for the animationduration, then just disappears. I hope that it is because of the simulator being too slow, but i might have just made a stupid mistake; as i will probably have to wait a while before i can test it on my device, i'd like you guys to see if something's wrong
    i set up 4 different views. depending on a value, either all of them, none of them or just 2 of them have to be shown. If a view that's needed now wasn't visible it fades in, same thing other way around for views that aren't needed anymore.
    if (wc==1) {
    [UIView animateWithDuration:1 animations:^{
    viewOne.alpha=100;
    viewTwo.alpha=0;
    viewThree.alpha=0;
    viewFour.alpha=100;
    else if (wc==2) {
    [UIView animateWithDuration:1 animations:^{
    viewOne.alpha=0;
    viewTwo.alpha=0;
    viewThree.alpha=0;
    viewFour.alpha=0;
    else {
    [UIView animateWithDuration:1 animations:^{
    viewOne.alpha=100;
    viewTwo.alpha=100;
    viewThree.alpha=100;
    viewFour.alpha=100;
    like i said, it works fine for fading in, but it does not for fading out... this function is being called after i swipe the view, and the value WC has been changed. thanks a lot for reading this text already

    alpha values should be between 0 and 1

  • How to set a Swing component as Modal window on a SWT Component.?

    How to set a Swing component as Modal on a SWT Component.I mean, I have a window (SWT Container) with some menu items.
    When I click on one menu item then i will get one new Swing Window.
    When creating the new frame I had passed Modal value as TRUE in the constructer.Now child is not behaving as Modal Window.I mean I am able to go to parent window even though the child window is opened as a Modal Window.This is only happened when I double click on the Title Bar of the Parent Window.
    If I try to click on any other part of the Parent Window except Title bar ... the child window is working as a Modal Window.
    Can any one suggest me to solve this one !!

    int this case, do this :
    JFrame f = new JFrame("Authentification");
    f.getContentPane().setLayout(new BorderLayout());
    f.getContentPane().add(myJPanel, BorderLayout.CENTER);
    f.setBounds(x,y,w,h);
    f.setVisible(true);
    Where myJPanel is the Panel you developped.

  • How to set a Swing component as Modal on a SWT Component?

    How to set a Swing component as Modal on a SWT Componen?.I mean, I have a SWt Component window and from that window I am displaying a SWING Component Modal window.
    The problem is my swing window is not working as Modal always.
    When I opened the swing window from SWT window,swing window is working as Modal.But if Idouble click on Menubar or Title bar of the SWT Window then my Swing window goes back.If I click on any other part of the SWT window.. then once again Swing window is working as modal.
    Can any one suggest me to solve this?
    I think this is isuue related with Swing over SWT..

    pradeep.rajadurai wrote:
    I want set the JTable as a background of jframe or jinternalframe , how it is possible One way that may work, you can always extract the image from a rendered JTable and then paint the same image into the JPanel that holds your components via it's paintComponent method, then added the JPanel to the app's contentPane.
    give me simple pgmIs English your second language? Because if so, please understand that this demand can be taken by some as rude.

  • Faded-Out / Trimmed DDL's Selected Text  in Adobe Reader X(10)

    Hi folks,
    My PDF form look good in all the preceding versions of Adobe Reader, but after upgrading to Adobe Reader X(10), the drop-down list box's selected text is getting faded-out/trimmed from it's right-side as you can see in the enclosed image.
    By the way, the text is in Hebrew.
    Any idea why this is happend and what can I do?
    Thanks,
    Yair

    Tow conclusions about my problem:
    1. The problem occurs only in Dynamic saved PDFs.
    2. It's about bad RTL support in Adobe Reader X(10) and this is a very good workaround: http://forums.adobe.com/message/2008415
    Great weekend!
    Yair

Maybe you are looking for

  • K9N PLATINUM RAM Issue

    Hello there, I have the following:     * AMD Athlon 64 X2 4200+     * K9N Platinum     * Kingston 1GB DDR2-800 Ram Dimm (PC2 6400, KVR800D2N5/1G) X4     * EVGA 512P3N802DX GeForce 8800 GT 512MB 256-bit GDDR3 PCI Express 2.0 x16 HDCP Ready     * Weste

  • IPad no longer pairing with Bose bluetooth headphones

    I have a iPad  with iOS 8.2. Suddenly I am not able to connect to my headphones. I rebooted the iPad but still no luck. I am able to connect the headphones to my Blackberry so do not think problem is with headphones. Will appreciate any help.

  • High CPU consumption with repaint while dragging

    Hi! I certainly hope someone can help me with this. I am building a graphical user interface for a graph with custom nodes and edges, the nodes being draggable. I have tried making each network component (node or edge) a JComponent. Now, I'm trying u

  • Why does ad blocker not work?

    this will be complicated.... my anti virus software, avast also notifies users that software is not up to date. when i updated that software i also got unwanted sh*t without my knowledge. those items include my PC back up and arcadeplayer. arcade pla

  • Oracle 11g

    Hi Guys, When was the first release of Oracle 11g? Thanks, Please Help!!!!!!!!!!!!!!!!!