How to unlock label color on purchsed game?

I've added myself to Permissions (Read and Write) and would like to change the label color of a game. Label, Lock File and Hide Extension are all greyed out...I don't believe it's an alias. It's the default from when I purchased/installed through the Mac store.
Is this simply Verboten (changing the label color, only, shouldn't be IMHO), or is there a fix?

I just tried that and it DOES work. Now, how do I exchange the Best Answer for yours? LOL So simple, but not in the LEAST bit intuitive.
@ Apple: That's the stupidest thing in the world (one among many others I won't bother to mention). Blocking the Label Color, that way? Sheesh.
@ jsd2: You get a Helpful Answer, since I already glommed onto the Best Answer (I was kinda irritated at Apple, which is why I did that). Thanks, loads...oh, and Go Pats!

Similar Messages

  • How to change label color on input validation?

    Hi,
    I couldn't find anything in the forum about changing a label color when a validation is unsuccessful.
    Here's a scenario; User enter a year value, click save, validation execute, year's is greater then 2005, validation fails, label color for that field is changed to red.
    Do I need to bind the label? If so, would you have a code snippet.
    Could someone point me in the right direction. Thx

    How about as follows?<h:outputLabel value="Year:" style="#{bean.yearStyle}"/>If you don't want to code style names in your bean, you can
    <h:outputLabel value="Year:" style="#{bean.yearError?'error':'normal'}"/>

  • How to change Label Color Dinamically

    Hallo, i have a Label:
    <s:Label id="fotoAssociata_nuostr" text="Foto Non Associata" left="512" top="138" color="RED"/>
    The color is RED and i want to change it dinamically through ActionScript but when i call this.fotoAssociata_nuostr, i can't find color property, why??.. How can i change it dinamically?
    Thx for help
    Max

    Hi
    You Can use ....
    var MyColor:int = 0xff0000;
    this.otoAssociata_nuostr.setStyle("color", MyColor);
    or
    this.otoAssociata_nuostr.setStyle("color", MyColorPicker.selectedColor);

  • How to change label color in LabelGraphics script?

    I am using ID CS4 and running the LabelGraphics script to label several images in a large document. When I run thre script, the box with the file name is transparent with black type. I would like the box to be white with black type. Is there any way to edit the script that will enable this? It would be great if there was an "object style" in addition to the "paragraph style" in the run script pop-up window. Anyone?

    Hi hylet,
    Here's how to change the LabelGraphics.jsx script itself to add an object style option:
    1. Look for the line:
    var myStyleNames = myGetParagraphStyleNames();
    And add this line before or after it:
    var myObjectStyleNames = app.documents.item(0).objectStyles.everyItem().name;
    2. Look for the lines:
    //Style to apply
    with(dialogRows.add()){
         with(dialogColumns.add()){
              staticTexts.add({staticLabel:"Label Style", minWidth:myLabelWidth});
         with(dialogColumns.add()){
              var myLabelStyleDropdown = dropdowns.add({stringList:myStyleNames, selectedIndex:0});
    And add the following lines after them:
    //Object style to apply to the text frame
    with(dialogRows.add()){
         with(dialogColumns.add()){
              staticTexts.add({staticLabel:"Label Object Style", minWidth:myLabelWidth});
         with(dialogColumns.add()){
              var myObjectStyleDropdown = dropdowns.add({stringList:myObjectStyleNames, selectedIndex:0});
    3. Look for the line:
    var myLabelStyle = myStyleNames[myLabelStyleDropdown.selectedIndex];
    And add this line before or after it:
    var myObjectStyleName = myObjectStyleNames[myObjectStyleDropdown.selectedIndex];
    4. Look for the line:
    myAddLabels(myLabelType, myLabelHeight, myLabelOffset, myLabelStyle);
    And change it to:
    myAddLabels(myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myObjectStyleName);
    5. Look for the line:
    function myAddLabels(myLabelType, myLabelHeight, myLabelOffset, myLabelStyleName){
    And change it to:
    function myAddLabels(myLabelType, myLabelHeight, myLabelOffset, myLabelStyleName, myObjectStyleName){
    6. Look for the line:
    myAddLabel(myDocument, myGraphics[myCounter], myLabelType, myLabelHeight, myLabelOffset, myLabelStyle);
    And change it to:
    myAddLabel(myDocument, myGraphics[myCounter], myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myObjectStyleName);
    7. Look for the line:
    function myAddLabel(myDocument, myGraphic, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle){
    And change it to:
    function myAddLabel(myDocument, myGraphic, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myObjectStyleName){
    8. Look for the line:
    var myTextFrame = myFrame.parent.textFrames.add(myLabelLayer, undefined, undefined,{geometricBounds:[myY1, myX1, myY2, myX2], contents:myLabel});
    And add the following line after it:
    myTextFrame.applyObjectStyle(app.documents.item(0).objectStyles.item(myObjectStyleName), true);
    9. (Optional) Look for the line:
    myTextFrame.textFramePreferences.firstBaselineOffset = FirstBaseline.leadingOffset;
    And delete it or put "//" in front of it--this will let the object style take care of setting the first baseline offset method.
    After you make these changes, the script adds the object style dropdown to the dialog:
    Thanks,
    Ole

  • Sa Color Finesse in After Effects Cs6 is locked how to unlock?

    I have a cloud subscription and After Effects Cs 6 will not unlock SA Color Finesse 3. How do I unlock?

    The Adobe AE installer always installs Color Finesse for you with no extra work on your part. It is then automatically serialized the first time you apply Color Finesse to a layer.
    If you've tried using an installer from our website (which does require a serial number), then as Myleium says, the easiest fix is to uninstall AE and then reinstall it.
    Bob Currier
    Synthetic Aperture

  • How to change the color of label of af:inputText

    Hi,
    I want to change the color of label of <af:inputText> box . I used skinning for this , but this is not working.
    what i m doing is
    af|inputText::label{
    color:red;
    bt this is not working , please suggest me some way to do it...
    bt if i do this
    af|inputText::label{
    background-color:red;
    this is working.
    Thnx..

    Hi,
    You didn't mention Jdev version,anyway you can try as
    <af:panelLabelAndMessage label="Username" id="id"  labelStyle="background-color:red;">
      <af:inputText id="id5" value="Test"
                                  simple="true"/>
    </af:panelLabelAndMessage>See
    color change

  • Changing HD label color

    Some time ago I had been able to change the HD label colors (black type on yellow label background).  I have forgotten how I did this.  However I try to do it, the Label color options are grayed out.  Can someone remind me how to do it, please? Thanks.

    Same problem, but now I'm in 10.7.4, and "ignore ownership..." was removed??
    ...or am I looking in the wrong place??
    Finder -> File -> menu w/ Get Info, but no box in this menu, or in the locked/unlocked Info Window for the HD...
    Also logged in as admin, and I'm not sure how to get at labels w/ su in Terminal...
    Thanks!

  • How to set background color for selected days in DateChooser

    How to set background color for selected days. I created
    checkbox for each day [Son,Mon,Tue,Wed,Thu,Fri,Sat] and a
    DateChooser, I want to change the background color for the selected
    day when i click on a button after selecting the desired checkboxs
    [ monthly wise/yearly wise]
    Thanks in advance

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

  • Y Axis label color inherits Pen color and not the default Label color.

    Hi,
    How do I enforce my Y Axis Label to taken the default color specified in the iChart Y-Axis Label Color property instead of picking it from the Pen color selected from the legend? I have a Y-Axis Label called "Total Stock", I can very well change the Label text using method
    document.TestChart.getChartObject().setYAxisLabel("Label from code");
    But when I use a similar
    document.TestChart.getChartObject().setYAxisLabelColor(Color);
    property, I dont see the color change on the screen. But when I get the color using a getYAxisLabelColor() method , the specified input Color is set. My Label in the Y-Axis, always inherits the Pen color of the selected Legend Item, by default the first Item color on Page Load.
    Settings done in the iChart:
    Use Selected Pen for label : Unchecked
    Y Axis Label Color: #000000
    Y Axis Label : Total Stock
    Show Y Axis Label: Checked.
    I appreciate your help,
    Ajitha

    Jeremy,
    I tried the method you mentioned...
    document.TestChart.getChartObject().setYAxisLabelColor(document.TestChart.createColor("#000000"));
    But I still dont see a change in the Label color.
    Another finding is, when I try to alert the Label color on load of the page or during the creation of the applet, I see the label color on the alert is not the pen1color but the default Label color that is set in the display template. I assume that the legend's default selection, overwrites the Label color with the first pen color, but I could not get it with the getYAxisLabelColor() method, even though I see it on the screen.
    Thanks!
    Ajitha

  • How to enable background color printing?

    how to enable background color printing?

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

  • Adobe Acrobat wipes the Finder label color of edited-saved PDF files

    Adobe Acrobat X Pro 10.1 wipes the Finder label color of PDF files when edited with Acrobat. For instance, if a PDF file has a particular Finder label color, if then it is open and edited or simply modify in any way (for instance, just marking some text with the yellow fluorescent marker) and saved, Acrobat wipes out the Finder label color of such file.
    How to send feedback to Adobe about this problem?
    Thanks.

    Report the issue here: https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • I can't apply a label color to some apps

    I'm trying to organize my Applications folder into apps paid for to developers, paid for via the MAS, freeware, and other designations.  When I highlight some apps, the label feature is grayed out and I'm unable to give these apps a label color.  I can't figure out what's common among these as some apps purchased through the MAS accept the label while otheres don't.  Same with other apps.  It's totally random to me and totally capricious.
    Can anyone suggest how to highlight any app with a color?  I'd even use Terminal if that's the way to go.
    I'm using Lion 10.7.2.
    Thanks!

    @tod- I actually figured it out and it's a bit easier-
    at the bottom of the Get Info screen, click on the tool icon with the down arrow and hit 'Apply to enclosed items' and it works.
    Im starting from scratch since my computer keep crashing so I re-downloaded and installed Lion. Now all of my applications are asking for serial numbers. it's weird since my old user shows up but the machine boots up as a new user and will not open the old applications..dgoing to open this in a new thread but thought I'd try my luck here.
    thx

  • Can I Set Submix Label Color

    I would like to be able to set the label color as can be done with tracks, and clips.  At the moment, all the submix tracks are the default green.
    Is there a way to set the label color? 
    In the manual, there is only a mention that the submix tracks have a color label, but no mention on how to change it, and cntl-click does not review a pop-up menu, and using the "Multitrack > Track Color" menu, has no effect.
    To me, is seems if a track has a color label, I should be able to change it...
    Any help would be greatly appreciated.
    TIA

    its still not working.
    i have the following:
    panelColorCode.setForeground(Color.black);
    panelColorCode.setLayout(new Gridlayout(0, 2));
    panelColorCode.setBackground(Color.white);
    ....add(new Label("Colour code"));
    ....add(new Label.. these are both white backgrounds
    ....add(new Label... ditto
    panelColorCode.setBackground(Color.gray);
    ....add(new Label....
    this last line sets the whole panel to gray, but i just want the last label to be greyed out. is this possible, am i being dim?
    thanks again for help

  • Label color organize

    How do I get my label color back. When I use right click mouse or via the pull down menu, it shows that I've selected a color for my label. But in finder all folders remain GREY. Not one single file has a color, and in previous OS I had several color coded.....  What's going on? What preverence have I forgotten?
    thnx, PH!L!P

    Maybe my description was not precise enough. Here it goes step by step:
    - In Finder go to the folder where you like to search in, probably your home
    - Command-F to go into "find mode"
    - Open the popup "Kind" on top left
    - Choose "Other..." -> a panel rolls down
    - Enter "label" into the search field (w/o quotes)
    - Select the found entry "File label", check "In Menu" if you like
    - Click OK -> the label color selector appears ...
    - select color and Spotlight starts searching
    CU, Robert

  • How connect dragable labels with line

    When I load the program labels will appear within the window. You can ckick
    and drag these labels. The code for this
    is very simple. The code works perfectly. However I want to extend my code to do
    the following :
    (1) I want to add an extra label .. it does not matter where on the screen
    [ JLabel label = new JLabel() ]
    (2) When I press this button I want a line to appear between the two
    moveable labels ( ie the two labels are joined together by the line)
    (3)Now here is the hard part.. Whenever I move either of the two labels
    the line stretches so that the two labels are still connected.
    start--->
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class Connection
    public static void main(String[] args)
    JFrame f = new JFrame("Connection");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(new ConnectionPanel());
    f.setSize(400,300);
    f.setLocation(200,200);
    f.setVisible(true);
    class ConnectionPanel extends JPanel
    JLabel label1, label2, label3, label4;
    JLabel[] labels;
    JLabel selectedLabel;
    int offsetX, offsetY;
    boolean dragging;
    public ConnectionPanel()
    setOpaque(false);
    setLayout(null);
    addLabels();
    addMouseListener(new LabelSelector());
    addMouseMotionListener(new LabelMover());
    public void paintComponent(Graphics g)
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(Color.white);
    g2.fillRect(0, 0, getWidth(), getHeight());
    g2.setPaint(Color.blue);
    Point
    p1 = getCenter(label1),
    p2 = getCenter(label2),
    p3 = getCenter(label3),
    p4 = getCenter(label4);
    g2.draw(new Line2D.Double(p1.x, p1.y, p2.x, p2.y));
    g2.draw(new Line2D.Double(p1.x, p1.y, p3.x, p3.y));
    g2.draw(new Line2D.Double(p1.x, p1.y, p4.x, p4.y));
    g2.draw(new Line2D.Double(p2.x, p2.y, p3.x, p3.y));
    g2.draw(new Line2D.Double(p2.x, p2.y, p4.x, p4.y));
    g2.draw(new Line2D.Double(p3.x, p3.y, p4.x, p4.y));
    super.paintComponent(g);
    private Point getCenter(JComponent c)
    Rectangle r = c.getBounds();
    return new Point((int)r.getCenterX(), (int)r.getCenterY());
    private class LabelSelector extends MouseAdapter
    public void mousePressed(MouseEvent e)
    Point p = e.getPoint();
    for(int i = 0; i < labels.length; i++)
    Rectangle r = labels.getBounds();
    if(r.contains(p))
    selectedLabel = labels[i];
    offsetX = p.x - r.x;
    offsetY = p.y - r.y;
    dragging = true;
    break;
    public void mouseReleased(MouseEvent e)
    dragging = false;
    private class LabelMover extends MouseMotionAdapter
    public void mouseDragged(MouseEvent e)
    if(dragging)
    int x = e.getX() - offsetX;
    int y = e.getY() - offsetY;
    Rectangle r = selectedLabel.getBounds();
    selectedLabel.setBounds(x, y, r.width, r.height);
    repaint();
    private void addLabels()
    int w = 125;
    int h = 25;
    Border border = BorderFactory.createEtchedBorder();
    label1 = new JLabel("Label 1", JLabel.CENTER);
    label2 = new JLabel("Label 2", JLabel.CENTER);
    label3 = new JLabel("Label 3", JLabel.CENTER);
    label4 = new JLabel("Label 4", JLabel.CENTER);
    labels = new JLabel[4];
    labels[0] = label1; labels[1] = label2; labels[2] = label3; labels
    [3] = label4;
    for(int i = 0; i < labels.length; i++)
    labels[i].setBorder(border);
    labels[i].setOpaque(true);
    labels[i].setBackground(Color.white);
    add(labels[i]);
    label1.setBounds(40, 40, w, h);
    label2.setBounds(215, 40, w, h);
    label3.setBounds(40, 200, w, h);
    label4.setBounds(215, 200, w, h);
    end-->
    In this code: How to add labels when to me it is necessary
    (From menu: add new label)?

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.Line2D;
    import javax.swing.*;
    import javax.swing.event.MouseInputAdapter;
    public class Connection
        ConnectionPanel connectionPanel;
        LabelWrangler wrangler;
        public Connection()
            connectionPanel = new ConnectionPanel();
            wrangler = new LabelWrangler(connectionPanel);
            connectionPanel.addMouseListener(wrangler);
            connectionPanel.addMouseMotionListener(wrangler);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(getUIPanel(), "North");
            f.getContentPane().add(connectionPanel);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
        private JPanel getUIPanel()
            JButton add = new JButton("add label");
            add.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    wrangler.willAcceptLabel = true;
            JCheckBox lineBox = new JCheckBox("show lines");
            lineBox.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    connectionPanel.showConnectionLines();
            JPanel panel = new JPanel();
            panel.add(add);
            panel.add(lineBox);
            return panel;
        public static void main(String[] args)
            new Connection();
    class ConnectionPanel extends JPanel
        boolean showConnections;
        int labelCount;
        final int
            N  = 2,
            NW = 3,
            W  = 1,
            SW = 9,
            S  = 8,
            SE = 12,
            E  = 4,
            NE = 6;
        public ConnectionPanel()
            showConnections = false;
            labelCount = 0;
            setLayout(null);
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(showConnections)
                Component[] c = getComponents();
                Rectangle r1 = new Rectangle();
                Rectangle r2 = new Rectangle();
                for(int j = 0; j < c.length - 1; j++)
                    c[j].getBounds(r1);
                    for(int k = j + 1; k < c.length; k++)
                        c[k].getBounds(r2);
                        Point p1 = getClosestPoint(r1, r2);
                        Point p2 = getClosestPoint(r2, r1);
                        g2.draw(new Line2D.Double(p1.x, p1.y, p2.x, p2.y));
        private Point getClosestPoint(Rectangle r1, Rectangle r2)
            double cx = r2.getCenterX();
            double cy = r2.getCenterY();
            Point p = new Point();
            int outcode = r1.outcode(cx, cy);
            switch(outcode)
                case N:
                    p.x = r1.x + r1.width/2 - 1;
                    p.y = r1.y;
                    break;
                case NW:
                    p.x = r1.x;
                    p.y = r1.y;
                    break;
                case W:
                    p.x = r1.x;
                    p.y = r1.y + r1.height/2 - 1;
                    break;
                case SW:
                    p.x = r1.x;
                    p.y = r1.y + r1.height - 1;
                    break;
                case S:
                    p.x = r1.x + r1.width/2 - 1;
                    p.y = r1.y + r1.height - 1;
                    break;
                case SE:
                    p.x = r1.x + r1.width - 1;
                    p.y = r1.y + r1.height - 1;
                    break;
                case E:
                    p.x = r1.x + r1.width - 1;
                    p.y = r1.y + r1.height/2 - 1;
                    break;
                case NE:
                    p.x = r1.x + r1.width - 1;
                    p.y = r1.y;
                    break;
                default /* INSIDE == 0 */:
                    System.out.println("INSIDE");
            return p;
        public void addLabel(Point p)
            JLabel label = new JLabel("label " + ++labelCount);
            label.setBorder(BorderFactory.createEtchedBorder());
            add(label);
            Dimension d = label.getPreferredSize();
            label.setBounds(p.x - d.width/2, p.y - d.height/2, d.width, d.height);
            repaint();
        public void showConnectionLines()
            showConnections = !showConnections;
            repaint();
    class LabelWrangler extends MouseInputAdapter
        ConnectionPanel connectionPanel;
        Component selectedLabel;
        Point offset;
        boolean dragging, willAcceptLabel;
        public LabelWrangler(ConnectionPanel cp)
            connectionPanel = cp;
            offset = new Point();
            willAcceptLabel = false;
            dragging = false;
        public void mousePressed(MouseEvent e)
            Point p = e.getPoint();
            // has a label been selected for dragging?
            Component[] c = connectionPanel.getComponents();
            Rectangle r = new Rectangle();
            for(int j = 0; j < c.length; j++)
                c[j].getBounds(r);
                if(r.contains(p))
                    selectedLabel = c[j];
                    offset.x = p.x - r.x;
                    offset.y = p.y - r.y;
                    dragging = true;
                    break;
            // if no selection, are we adding a new label?
            if(!dragging && willAcceptLabel)
                connectionPanel.addLabel(p);
                willAcceptLabel = false;
        public void mouseReleased(MouseEvent e)
            dragging = false;
        public void mouseDragged(MouseEvent e)
            if(dragging)
                int x = e.getX() - offset.x;
                int y = e.getY() - offset.y;
                selectedLabel.setLocation(x, y);
                connectionPanel.repaint();
    }

Maybe you are looking for