Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

How To Create Java Button Or Frame


18 replies to this topic

#11 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 16 April 2008 - 07:09 AM

upload code
How To Create Java Button Or Frame

Write a programme to upload file in datebase or ms excess.

-reply by rashmi

#12 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 03 June 2008 - 04:17 AM

How to remove the maximize button from the frame or to set a fixed size for a frame at the center of the monitor with a fixed size

-reply by salish

#13 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 06 June 2008 - 12:46 PM

more text in dialog box
How To Create Java Button Or Frame

I want to create the dialog box that will accept the userid and password from user check it and go to other form by using dialog box not frame.

-question by salish

#14 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 06 August 2008 - 08:35 AM

what with all customize?
How To Create Java Button Or Frame

How can I make my own customized button and put it in my program (JAVA)

Let's say I have predone program with a button and I have done my one button picture in Photoshop (and let's say it's form is a circle)
How can I change the regular look of a windows button or java button to this my own.
What code do I need?

-reply by solomon

#15 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 27 August 2008 - 02:33 PM

displaying a messagebox
How To Create Java Button Or Frame

Replying to iGuest
You can use
JOptionPane.ShowMessageDialog(null,"YOUR MESSAGE HERe!!","NAME OF TITLE BAR HERE!!",JOptionPane.PLAIN_MESSAGE);//you can use JOptionPane.INFORMATION_MESSAGE if you want an information icon,JOptionPane.ERROR_MESSAGE if you want an error icon,JOptionPane.WARNING_MESSAGE if you want a warning icon, JOptionPane.QUESTION_MESSAGE if you want to pose a question to he user

-reply by joseph

#16 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 09 September 2009 - 08:55 AM

public class CustomeButton extends JButton{

public CustomeButton(){

setBorderPainted(false);

setContentFilled(false);

}

public void paintComponent(Graphics g){

g.SetColor(Color.White);

g.FillRoundRect(0,0,100,30,5,5);

}

}//end class

 

you can extend more features to this class and create more graphical button

baii

-reply by hacker

#17 eurobeat

    Newbie [Level 3]

  • Kontributors
  • PipPipPip
  • 40 posts

Posted 09 September 2009 - 04:50 PM

View Postspieleforum, on Sep 3 2006, 11:32 PM, said:

Yes i would Prefer this way because its much easier than doing a own Look and Feel but when you create a own look and Feel you can change the Design of all Buttons in you Programm even the Buttons that are used in the programm bevore you created the new Look and Feel

i have a question too
he wanted to set up a background image to his new Button how can i do this? when i extend From "JButton" ?

overwrite the "paint(graphics g)" method

#18 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 03 November 2009 - 12:35 PM

buttons with same nameHow To Create Java Button Or Frame

good evening.

if we have 2 buttons with the same name and each button related to an event

how could the system distinguish between them if we select one?

thanks

-reply by rasha

#19 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 04 March 2010 - 07:59 PM

Buttons too large, text replaced by ellipsis...How To Create Java Button Or Frame

Hi,

I've tried creating buttons with e.G. A single character in them, but find that I have to make them ridiculously large to show even such a short string. The height and width needs to be about 4 times the text dimensions, otherwise I just get "...". Is this internal padding something I can adjust or is this part of the "look and feel"?

Neil

 






Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users