Left- and right-justifying with dot leaders in JLabel and JButton

Hi,
I am developing checklists using JLabel and JButton components and want to finish up with the text in each component looking something like the following (each line is a separate button/label):
ACTION No1............................RESPONSE No1
ACTION No2............................RESPONSE No2
ACTION No3............................RESPONSE No3
The idea is to have the �Action� text left-justified and the �Response� text right-justified with dot-leaders as shown.
Each text line will be put into its own fixed length label or button.
I plan to construct a string from text blocks �ACTION No1� and �RESPONSE No1� and add the calculated, exact no of dots in between to fill the space.
The text font can be fixed (e.g. Courier) or proportional (e.g. Arial).
My question is how to calculate the number of dots to add to fill the space for different fonts and font sizes.
I think that using FontMetrics could provide some help but am not sure how this would work.
Can anyone help.
Many tks
John

Hi,
I've developed your suggested code further to enable selected JLabels to be toggled visible(true/false) by pressing a JButton.
I'd like however that when a label is made invisible that the rest of the labels/buttons move up to fill the space left by the now invisible label and vice versa.
How do I do this, can you enlighten me on a solution?
Modified code included below. Not very elegant but serves to illustrate the point in question and only makes the label invisible.
Many tks
John
package componentwierd;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ComponentWierd extends JFrame implements ComponentListener, ActionListener {
    boolean isVisible = true;
    JLabel label2 = new JLabel();
    public ComponentWierd() {
        getContentPane().setLayout( new GridLayout(0, 1) );
        // Using my original suggestion
        JLabel label = new JLabel();
        label.setLayout(new BorderLayout());
        label.add(createWierdComponent());
        getContentPane().add(label);
        JButton button = new JButton();
        button.setLayout(new BorderLayout());
        button.add(createWierdComponent());
        button.addActionListener(this);
        getContentPane().add(button);
        // Using Font Metrics
        // JLabel label2 = new JLabel("Label2 West...Label2 East");
        label2.setText("Label2 West...Label2 East");
        label2.addComponentListener( this );
        getContentPane().add(label2);
        JButton button2 = new JButton("Button2 West...Button2 East");
        System.out.println(button2.getIconTextGap());
        button2.addComponentListener( this );
        button2.setVisible(true);
        getContentPane().add(button2);
    public void actionPerformed(ActionEvent e) {
        if (isVisible == true) {
            isVisible = false;
            label2.setVisible(false);
        } else if (isVisible == false) {
            isVisible = true;
            label2.setVisible(true);
    private JComponent createWierdComponent() {
        JPanel panel = new JPanel(new BorderLayout());
        panel.setOpaque( false );
        panel.add(new JLabel("Label WEST"), BorderLayout.WEST);
        panel.add(new JLabel("..............................................."));
        panel.add(new JLabel("Label EAST"), BorderLayout.EAST);
        return panel;
    public void componentResized(ComponentEvent e) {
        if (e.getComponent() instanceof JLabel) {
            JLabel component = (JLabel)e.getComponent();
            String text = component.getText();
            String fitText = fitText(component, text);
            component.setText( fitText );
        if (e.getComponent() instanceof JButton) {
            JButton component = (JButton)e.getComponent();
            String text = component.getText();
            String fitText = fitText(component, text);
            component.setText( fitText );
    private String fitText(JComponent component, String text) {
        // Calculate the total width for painting the text
        // (Not sure why I need the -8)
        Insets insets = component.getInsets();
        int availableWidth = getWidth() - insets.left - insets.right - 8;
        // Calculate the minimum width our text will take
        String start = text.substring(0, text.indexOf("."));
        String middle = "...";
        String end = text.substring(text.lastIndexOf(".") + 1);
        FontMetrics fm = getFontMetrics( component.getFont() );
        int startWidth = fm.stringWidth( start );
        int middleWidth = fm.stringWidth( middle );
        int endWidth = fm.stringWidth( end );
        int minimumWidth = startWidth + middleWidth + endWidth;
        // Add dots to fill out the extra space
        StringBuffer buffer = new StringBuffer(start);
        buffer.append(middle);
        if (minimumWidth < availableWidth) {
            String dot = ".";
            int dotWidth = fm.stringWidth( dot );
            int dots = (availableWidth - minimumWidth) / dotWidth;
            for (int i = 0; i < dots; i++) {
                buffer.append( dot );
        buffer.append(end);
        String result = buffer.toString();
        return result;
    public void componentHidden(ComponentEvent e) {}
    public void componentMoved(ComponentEvent e) {}
    public void componentShown(ComponentEvent e) {}
    public static void main(String[] args) {
        ComponentWierd frame = new ComponentWierd();
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.setSize(200, 200);
        frame.setLocationRelativeTo( null );
        frame.setVisible(true);
}

Similar Messages

  • I have a two screen system that reads left to right.  With Yosemite it now reads right to left.  How do I fix it?

    I have a two screen system that read left to right.  With Yosemite the screens have switch and now the mouse and my brain have to read right to left.  Any ideas how to fix this?

    a brody,
    After further scrutiny your solution solved the mouse problem of going left to right.  But now the home screen problem.  Display two on the right still has the dock below and the menu bars.  Any ideas how to fix this?

  • Tab delimited and Right justified fields

    Hi
    My requirement is to produce an output file where the line items consists of 5 fields of variable lengths and all of them are tab delimited and right justified at the same time
    for eg.
    ABC       123456ghtje  4567.45678   67.45678  pqr
    where all the values in the first field 'ABC' and 2nd field '123456ghtje' are right justified and are tab delimited and asme is the case for '4567.45678' , '67.45678' and 'pqr'
    they are all separated from each other by a tab but are not fixed lengths
    How can i achieve that ? i am using File Receiver Adapter ??
    Can it be done without Adapter Module ?
    Thanks
    Dev
    Edited by: sd on Feb 22, 2010 2:25 PM
    Edited by: sd on Feb 22, 2010 2:26 PM

    > they are all separated from each other by a tab but are not fixed lengths
    When thay are not fixed length fields, why do you have to worry about left or right justification? In delimetted files, you would only have the delimitter between the fields. You do not need to fill spaces for justifying them.
    VJ

  • How to integrate Oracle Right Now with our application Calling Button and Chat Button  Application is on WebCenter  Sites

    How to integrate Oracle Right Now with our application Calling Button and Chat Button. Application is on WebCenter  Sites

    Thanks handar. As per your instructions I have tried OAM authorization policy and its working fine. But we also wants to check the same with OES also. Currently I have configure weblogic SM and created domain. In same domain I have deployed my application also. I have created application, resources and authorization policy to authorize /myfolder/index.jsp if user has some specific role. Now if I try to access my web application using http://host:8001/CONTEXT/myfolder/index.jsp, it doesn't check if user is authorized or not. I guess my application is not related to the resource I have created. Please help me with this. Also, let me know if we can retirive logged in user from session and use for authorization.

  • HT4623 I have an IPhone4 and is updated with version 6.1.3 and I am not able to connect with face time calls. I have checked the date ant time. I used to be able to use face time with no problem. since the late os upgrace I have not been able to connect w

    I have an IPhone4 and is updated with version 6.1.3 and I am not able to connect with face time calls. I have checked the date ant time. I used to be able to use face time with no problem. Since the late os upgrace I have not been able to connect with face time.

    Read http://support.apple.com/kb/ts3367

  • What is the maximum number of PVC's supported by Cisco BPX 8620 and 8680 chassis with BCC-4V 128MB DRAM and 4 MB BRAM?

    We are working on a capacity planning project for one of our customers and we need an estimate on the maximum number of PVCs supported in the following situations:
    a)Cisco BPX 8620 and 8680 chassis with BCC-4V 128MB DRAM and 4 MB BRAM ?
    b)Maximum number of PVC's supported by each of the following STM-1 cards:
    - model BXM-155-4D and 4DX ?
    - model BXM-155-8D and 8DX ?

    a)It depends upon software level. b) 16,000 per card, With release 9.3:
    60K Connections Support on BXM-E—Provides the ability to support a maximum of 60K per card for VSI applications for the BPX 8600, for example, PNNI or MPLS, used on enhanced BXM-E cards.

  • Mine is i-phone 4  16G. Feel so sorry upgraded to IOS 7.0.4 which slow down my phone dramatically and less responsive with the touch screen. And in times it frozen on me, the worst. Anyone has the magic wand to downgrade the IOS back to 5 o 6...

    Mine is i-phone 4  16G. Feel so sorry upgraded to IOS 7.0.4 which slow down my phone dramatically and less responsive with the touch screen. And in times it frozen on me, the worst. Anyone has the magic wand to downgrade the IOS back to 5 o 6...

    There is no way to downgrade to a different iOS. Apple does not support downgrading. See this link regarding speeding up the iPhone 4. http://osxdaily.com/2013/09/23/ios-7-slow-speed-it-up/

  • My mom helped me to create my iTunes account and load it with a 50$ gift card and now I wanted to purchase a one month subscription at the AYI dating web service but apple never let them take money from my account and I was declined,don't know why?

    My mom helped me to create my iTunes account and load it with a 50$ gift card and now I wanted to purchase a one month subscription at the AYI dating web service but apple never let them take money from my account and I was declined,don't know why?

    You have posted to the iTunes Match forum, which your question is not related to. I suggest you contact the web site from whom you wish to purchase the subscription.

  • Left and right justifiation in alv grid

    I m using alv grid to display a tbale.I have to justify one perticular cell depending on value.So i have to first check the value of that field in itab and then justify right or left accordingly.
    Therefore , i cnt use just field of field catalog as im not goin to justify whole column.
    I tried to save justified value in itab  and then display in alv but alv doesnt display white space charaters in start and end.
    Could you help me with this topic.
    regards

    hii,
    i think this is not possible.

  • ITunes 7 playing only from left and right channels with 5.1 speakers

    I have an SB Audigy 1 sound card with Creative Inspire 5200 digital 5.1 speakers, and iTunes only plays audio from the left and right speakers, and the subwoofer. The other 3 speakers work; I've tested them.

    I am having more or less the same problems as you guys. Currently I use a soundblaster audigy 4 with "CMSS 3D" function ... it used to work with itunes but started to get all weird with the 7.0 update. If nobody knows how to fix this I will have to use 6.xx again :/
    I'd be grateful for any advice as well,
    thanks in advance.
    Windows XP

  • The homepage is right justified with no access to the scroll tools on the right of the screen

    The homepage for firefox is seemingly justified to the right of the screen, and there is no access to the scroll toll that is normally on the right side. Have tried changing the size of the screen, with no change. Can only use the up and down arrows to move arround the page. There also is no scroll tool at the bottom, the left and right arrows and ineffectual for movement side to side.

    Please click the '''Solved It''' button next to the answer that answered or solved your Firefox support issue, '''''it appears when you are logged in''''', so this thread gets marked as '''Solved''' to help other users who may have this same problem.

  • Install and config issues with Oracle Portal, Forms, Reports and Discoverer

    For a while now I've been struggling with migrating a testing database to a newer version.
    And right now I'm pretty much stuck at trying to configure Oracle Portal, Forms Reports and Discoverer
    What I've got:
    Windows server 2008 R2 64bit
    Oracle 11g database
    Java 6u27 64bit
    JDK 1.6 64bit (using this after 1.7 ended up throwing out bugs while trying to start a weblogic server)
    JDK 1.7 64bit
    Weblogic 10.3.5 (or so i think - I've installed from the wls1035_generic.jar from the oracle website)
    PFRD 11.1.1.2 with 11.1.1.3 installed over it, installed without config
    and a hanging up configuration
    Basically I've been trying to install PFRD (only forms, reports and enterprise manager from it actually) but it kept failing once it got to the configuration stage, so I installed without config, applied 11.1.1.3 and now trying to run the config manually with the good old \bin\config.bat
    Result - the config froze for approx.18 hours then failed
    There isn't much useful info I could deduct from the logs, mostly just says one or more configuration parts failed. At one place it mentions trying to set up a domain and starting up an adminserver for it - and apparently that's where it hangs up and finally times out and fails.
    I'm a little clueless what to do about it as the logs don't say anything else of use I could understand. Any ideas there?

    Trying the step by step, the only difference between that and what i do seems to be the file copying (which I can't do - there is no windows\extra\ directory anywhere, the files mentionned seem to already be on their places and either only there, or exactly the same) and clistering
    So far the news ain't good - the config process hangs on creating domain ->Step Creating Domain started
    It isn't frozen per se - the process doesn't use up any processor time, memory consumption within bounds, it reacts to button clicks and all..it just doesn't do anything concerning the said domain
    the last thing the .out file shows:
    Creating a new AdminServer Object ...
    AdminServer port is 7002
    Starting the domain ...
    LOADING DLL : E:\OracleDb\Middleware\develtools\install\config\\StartUtil64.dlland in the log:
    [2011-09-08T11:57:03.456+02:00] [as] [NOTIFICATION] [] [oracle.as.install.engine] [tid: 14] [ecid: 0000J98U0KsFS8XLxuDCiW1EQ92r000005,0] Setting >valueOf(DOMAIN_PORT) to:7002. Value obtained from:USERit's the same it did last time, when after 18hours it woke up with .out saying:
    oracle.as.provisioning.util.ConfigException:
    Error while starting the domain.
    Cause:
    An error occurred while starting the domain.
    Action:
    See logs for more details.
         at oracle.as.provisioning.util.ConfigException.createConfigException(ConfigException.java:123)
         at oracle.as.provisioning.weblogic.ASDomain.startDomain(ASDomain.java:3173)
         at oracle.as.provisioning.weblogic.ASDomain.startDomain(ASDomain.java:3033)
         at oracle.as.provisioning.engine.WorkFlowExecutor._startAdminServer(WorkFlowExecutor.java:1644)
         at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:634)
         at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:390)
         at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
         at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
         at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
         at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
         at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
         at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:335)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:87)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:104)
         at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
         at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:63)
         at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:158)
         at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
         at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:83)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: oracle.as.provisioning.util.ConfigException:
    Error while starting the domain.
    Cause:
    Starting the Admin_Server timed out.
    Action:
    See logs for more details.
         at oracle.as.provisioning.util.ConfigException.createConfigException(ConfigException.java:123)
         at oracle.as.provisioning.weblogic.ASDomain.startDomain(ASDomain.java:3143)
         ... 18 more
    oracle.as.provisioning.exception.ASProvisioningException
         at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:872)
         at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
         at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
         at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
         at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
         at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:335)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:87)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:104)
         at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
         at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:63)
         at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:158)
         at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
         at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:83)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: oracle.as.provisioning.exception.ASProvWorkflowException: Error Executing workflow.
         at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:685)
         at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:390)
         at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
         ... 13 more
    progress in calculate progress4
    progress in calculate progress4
    oracle.as.provisioning.exception.ASProvisioningException
         at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:872)
         at oracle.as.install.classic.ca.standard.StandardWorkFlowExecutor.execute(StandardWorkFlowExecutor.java:65)
         at oracle.as.install.classic.ca.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:26)
         at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
         at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:124)
         at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:335)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:87)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:104)
         at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
         at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:63)
         at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:158)
         at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
         at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:83)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: oracle.as.provisioning.exception.ASProvWorkflowException: Error Executing workflow.
         at oracle.as.provisioning.engine.WorkFlowExecutor._createDomain(WorkFlowExecutor.java:685)
         at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:390)
         at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:866)
         ... 13 more
    Going to execute executeAfterConfig
    java.lang.IllegalStateException: Action:Application Configuration failed with error:Configure Classic Failed.
         at oracle.as.install.engine.modules.configuration.client.ConfigAction.fail(ConfigAction.java:227)
         at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:129)
         at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:335)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:87)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:104)
         at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
         at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:63)
         at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:158)
         at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
         at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:83)
         at java.lang.Thread.run(Thread.java:619)
    In Config Module Finish Event...and the log continuing with some variable setting notifications and this:
    [2011-09-08T08:27:45.272+02:00] [as] [ERROR] [] [oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager] [tid: 14] [ecid: >0000J93lRQOFS8XLxuDCiW1EPpn_000005,0] One or More configurations failed. Exitingthen again more traces and notifications until the end marking config as failed
    I'm kinda paranoid about the double backslash in the dll path, but other than that no clue as to why the domain doesn't set up
    the other link you mentionned seems to have no relevance yet
    does that clear up anything for you though?
    ..can the lack of SOA suite have anything to do with the problem?

  • I have the combo pack Photoshop and Premiere 10 with the multi DVD's and I have Windows 7 Ultimate 6

    I have the comb pack Photoshop 10 and Premiere 10 with multi DVD's labeled 1 of 5 throu 5 of 5 . I have Windows 7 Ultimate and I'm just confused do I start with 1 of 5 then go to 2 of 5 and the fallow it up with 4 of 5 and 5 of 5 ?????? I think I lost a screw, don't know why it has got me baffeled.

    Roy Begue wrote:
    do I start with 1 of 5 then go to 2 of 5 and the fallow it up with 4 of 5 and 5 of 5 ?
    Yes, sounds right.
    You may find that only Disc 1 is the application disk (to install the actual software) and the rest are extra content/templates/goodies.

  • Inherited fields and methods shown with the class own fields and methods

    In each subclass page, javadoc includes the fields and methods of the superclass as if they were declared in the subclass. However the methods inherited from Object are shown in a separate box.
    Is there a way to make javadoc group all inherited fields and mehods in separate boxes, one for each superclass?
    I'm using the javadoc tool from J2SE v 1.4.2_07 SDK with NetBeans 4.0 Bundle.
    Thanks.

    Yes, I know it does, but it seems that the superclass
    must be declared public.Sort of. Per default javadoc documents public and protected types and members. With this setting, where would you expect the documentation of public members of a package-private super class to be?
    If you specify -package or -private as an option for javadoc, package-private and/or private types and members are documented, too, so package-private super classes are documented as usual.

  • How do you add a colored picture on top of a black and white picture with out it turning black and white too?

    I am making grad invites and i keep trying to add a colored picture on top of the black and white background picture and it keeps changing the colored one black and white i am using Photoshop CC 2014! any help is greatly appreciated! I cant figure this one out!

    What is the file type? Is it a file that supports layers?  Is the color photo in its own layer?
    Please post a screenshot of the layers panel.

Maybe you are looking for

  • How to wipe/reset macbook pro with retina display?

    I just got my new macbook pro! But I put information from another that I don't want. So how can you wipe without a disk besides bringing it to Apple?

  • R3 3.1I Installation on AIX and Oracle

    Hello All, I am installing sap R/3 3.1I on Oracle 9.2 on AIX 5.3. I have one question my AIX box is already running one R3 Instance which is running on Oracle 8.0.1. Can I still use the same AIX server for installing the 3.1I r/3 system on Oracle 9.2

  • Photo booth is not opening after installing maverick

    I updated my computer to Maverick and now photo booth is not opening. I could care less about the application itself but there are pictures that I really do not want to lose. It says that "You can't use this version of the application "Photo Booth" w

  • Ora-04021 during import

    Hi Guys, I am doing an import during which i got this error . IMP-00017: following statement failed with ORACLE error 4021: "GRANT EXECUTE ON "VCP_PMC_PKG" TO "HERNANDEZO"" IMP-00003: ORACLE error 4021 encountered ORA-04021: timeout occurred while wa

  • Need solution for the query

    hi All, I have 3 tables 1)PREVILEGES (groupname, previleges(values y or n only)) 2)GROUPS (groupid, groupname) 3) USERS (uname, groupname). Here each user belongs to one group, each user hav a default previlege means example if user is consutant then