Results 1 to 3 of 3
  1. #1
    jfpeji is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default Custom Matlab pushbutton appearance with Java

    I want to change the appearance of a Matlab pushbutton with Java. For it, I use the application Findjobj. However, because of I do not know Java, I have troubles to use Java classes properly that I need to get my button has rounded corners. Based on the information found here), I have tried to set up the button with the class LineBorder:

    Java Code:
    import java.awt.Color;
    import javax.swing.border.LineBorder;
    hButton = uicontrol('Style','pushbutton','String','click me!',...
        'Units','normalized','Position',[0.156 0.64 0.688 0.1],'FontSize',9,...
        'ForegroundColor','w','BackgroundColor','k');
    jButton = findjobj(hButton);
    jButton.setCursor(java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jButton.setBorder(LineBorder(Color.white,5,true));

    However, the result still be unpleased for me. Here is the final appearance http://i.stack.imgur.com/Oblck.png. I can get the corners to be rounded.
    Last edited by jfpeji; 02-11-2012 at 09:56 PM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,202
    Rep Power
    19

    Default Re: Custom Matlab pushbutton appearance with Java

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    jfpeji is offline Member
    Join Date
    Feb 2012
    Posts
    2
    Rep Power
    0

    Default Re: Custom Matlab pushbutton appearance with Java

    You are right. I did it because I think I need the answer of an Java expertise.

Similar Threads

  1. matlab - java
    By henna in forum CLDC and MIDP
    Replies: 1
    Last Post: 02-04-2012, 07:58 AM
  2. How to apply a patch (Call Matlab from Java)
    By Niroshan in forum Advanced Java
    Replies: 6
    Last Post: 07-09-2011, 02:55 AM
  3. run a matlab script from java
    By npoorni in forum Advanced Java
    Replies: 5
    Last Post: 02-11-2010, 03:32 PM
  4. Help, Integrate a Java with Matlab
    By toby in forum Advanced Java
    Replies: 2
    Last Post: 08-07-2008, 07:08 AM
  5. Replies: 3
    Last Post: 04-10-2008, 09:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •