Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1

    Default HELP: JAVA and NETBEANS


    nagsearch ko sa web, unsa-on pag disable ang checkbox like sa radiobutton... pero wala ko kahuha ug idea... ingon ani ni siya: i have 2 class, 1 is the controllerClass and the other the PanelClass using netbeans naakoy checkbox, pero pwede man sad gamitan ug radiobutton pero wala ko idea unsaon, checkbox1(cash), checkbox2(credit), checkbox3(cod) nya ang gusto nako mahitabo nga kung mo click sa cash kana ganing mo disable and credit ug cod, ang tanang code nako naa sa controller class, ang sud sa panel kay ang gui ra...wala gyud koy idea unsaon gamit ang netbeans...any ideasthnx mga master

  2. #2
    Netbeans akong gamit

    gamit sa setEnabled(false) method para ma disable

    JCheckBox checkbox = new JCheckBox("Credit Card");
    checkbox.setEnabled(false);

    Simple kaau pagdesign ug gui sa netbeans, gamit lang sa matisse, himo una ug JFrame, drag and drop na ang pag design, daghan tutorial sa netbeans.org, adto lang basa.

  3. #3
    ok sir, nakuha man nako ang design pero ang problem kay ang akong mga codes naa sa lain nga dot.java, kanang unsaon pag-set false sa check box nga wala ka sa jframe nga class, kana ganing ipasa-pasa ang value thnx sir, try nako sa netbeans.org

  4. #4
    You can make the object on the other class to public.
    And use the instance of that class to access that object.

  5. #5
    ang gilibugan nako sir, kay sa netbeans ang key raman imong basihan para makuha ang value diba ang akong nalibugan kay kung naa koy usbon sa property sa checkbox ang key lang ba gihapon ang gamiton? kay ako gisuwayan dili man ma-set ang property niya using key ...thnx

  6. #6
    pareha raba gamit ang kanang nga sa java nga sa internet sa kanang dli sa internet

  7. #7
    @moz_k2: this is okay. but i dont recommend making the object public. although that would be a case to case. but mostly, its better to create another public method for the purpose of setting and resetting the value or values of the object.

    @rastaman81: if what u want is to change the ui or the state of the gui components during runtime (example from enabled to not enabled), you probably need to revalidate the components or the component tree sa imong gui. i think ok ra nga ang validate nga method sa parent nga component ang imong tawgon. or i think naa pud validateTree. kalimot na ko. but try that and see what happens.

  8. #8
    I agree with zengatsu...its always preferable to use setters and getters to manipulate private components of a class.

    @rastaman81: if you intend to enable only one of the checkbox at a time. i suggest you use radiobuttons. i think radiobuttons will suit the kind of implementation you want. Create 3 radiobuttons and then create a button group. then set the buttonGroup property of each of the radiobuttons to the button group you have just created.

  9. #9
    thnx, if finally worked...Radio button nalang ako gigamit...thnx

    follow-up question lang ko:
    1st Question:
    unsaon man pag query gamit ang mysql sa naay single qoute(')
    ex:

    select * from master where compName = 'Cebu's Yayoy's grill';
    kani nga query sulod ni sa java class, naglibog ko kay mo error man gud...THNX

    2nd Question:
    unsaon man pagdisplay sa jasper nga imbes horizontal imo ipavertical
    ex:
    Asia | America | Europe
    Philippines U.S.A Italy
    Hong Kong Canada Rome

    nya ang inig display sa jasper kay ingon ani gani:

    Asia Philippines Hong Kong
    America U.S.A. Canada
    Europe Italy Rome

    bisag idea lang ug unsaon thnx....

    peace out ,\m/

  10. #10
    Quote Originally Posted by rastaman81 View Post
    thnx, if finally worked...Radio button nalang ako gigamit...thnx

    follow-up question lang ko:
    1st Question:
    unsaon man pag query gamit ang mysql sa naay single qoute(')
    ex:

    select * from master where compName = 'Cebu's Yayoy's grill';
    kani nga query sulod ni sa java class, naglibog ko kay mo error man gud...THNX
    para ani. use an escape character;

    use the \'

    select * from master where compName = 'Cebu\'s Yayoy\'s grill'

    try lang..


    for more info

    MySQL :: MySQL 5.0 Reference Manual :: 8.1.1 Strings

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. i so need help JAVA and jsp
    By forsaleonly in forum Programming
    Replies: 16
    Last Post: 01-20-2009, 03:19 PM
  2. Java and DotNet Interoperability
    By digitalsuperman in forum Programming
    Replies: 0
    Last Post: 08-22-2006, 10:18 PM
  3. Help - - Distorted and Scratchy Sound
    By rochelle in forum Computer Hardware
    Replies: 8
    Last Post: 08-07-2006, 09:28 PM
  4. Help! VB and Firebird.
    By daryl in forum Programming
    Replies: 1
    Last Post: 05-11-2006, 11:01 PM
  5. HELP: Type and MaxSize of HD (Asus P2B98-XV and Intel CA810)
    By rocknolds in forum Computer Hardware
    Replies: 4
    Last Post: 11-15-2005, 04:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top