How to set the location of a button (in an applet)
Hello
How do i set the location of the button
forexample if i want to create a button in the middle of the applet, how would i do that
Thanks :)
supahsain08 wrote:
Well i did this
Triangle.setLocation(50, 100);
(where Triangle is a buton)
it doesn't do anything, stays at the same placeIt's all about context here and there are still many unknowns here that can effect your result and that you have not told us or shown us. My suggestion to you is to consider posting an SSCCE (Short, Self Contained, Correct (Compilable), Example, a condensed program similar to your current program in that it demonstrates the problem at hand, but is the smallest bit of code that still compiles and has no extra code that's not relevant to your problem. For more info on SSCCEs please look here:
[http://homepage1.nifty.com/algafield/sscce.html|http://homepage1.nifty.com/algafield/sscce.html]
Also, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, you can will need to paste already formatted code into the forum, highlight this code, and then press the "code" button at the top of the forum Message editor prior to posting the message. You may want to click on the Preview tab to make sure that your code is formatted correctly. Another way is to place the tag [code] at the top of your block of code and the tag [/code] at the bottom, like so:
[code]
// your code block goes here.
// note the differences between the tag at the top vs the bottom.
[/code]or
{code}
// your code block goes here.
// note here that the tags are the same.
{code}good luck, pete
Similar Messages
-
How to set the location of a button
Hello
How do i set the location of the button
forexample if i want to create a button in the middle of the applet, how would i do that
Thanks :)Do not make duplicate posts.
http://forum.java.sun.com/thread.jspa?threadID=5293505&messageID=10240164#10240164 -
How to set the Size to an extension of an applet?
Greetings,
I have a frame that i added to ti a class that extends from applet, on this extension there are two pannels.
i want that when i resize the frame aslo the apllet will be resized. i added to the frame a compenentlistener and when the frame gets an resize event i call the setSize method of the applet with the frame's dimention, but it doesnt work. How do i do it correctly?I have not tried this yet but maybe it works:
At the applet tag set size of the applet to "100%"
and use HSPACE and WSPACE.
Don't know, if it'll work. -
How to set the default button of an ALERT
Can someone help me how to set the alert propety to change the default button from button1 to button2.Not from the prioperty palette, but inside the code using like set_alert_property.I am using the Oracle Forms 10g.
Thanks in advance.
SriniTo the best of my knowledge, the default button cannot be set at runtime. This must be set at design time in the Builder.
Refer to the Forms Builder online help for details:
http://www.oracle.com/webapps/online-help/forms/10g/topics/f1_help/builts/setatpro.html -
How to set the short cut key for buttons
Hi
I dont know how to set the short cut keys for the button...can u pls help me outDo you mean a short cut key for buttons at client side (web browser)? If yes, you could do it with JavaScript~~~ ^o^
-
Can u tell me how to set the color of the button and its border
hi to all,can u tell me how to set the color of the button and its border
There are sample code on the java.sun.com
http://java.sun.com/docs/books/tutorial/uiswing/components/example-swing/index.html
try this web page ... There are lots of examples... Good luck ... "Gan en " -
Can anyone tell me how to remove the owner when setting the location
Hello,
Can anyone tell me how to remove the owner when setting the location?
Properties
Table Name: (Table Name)
Table Type: Tables
Owner: Public
Overridden Qualified Table Name: (Table Name - same as above)
Any help would be appreciated.
Thanks
AnnHi Ann,
please check this document to determine the correct space for your question:
Find Topic Spaces on SCN (Forums)
If you need help moving it, let me know!
Thanks,
Kristen -
How to set the a graphic ( 3 radio buttons ) in the report ?
Hi Exports,
1. How to set the a graphic ( 3 radio buttons ) in the report ?
Acutely I want to fetch the record from MCHB-CLABS and MCHB-CSPEM , if the data read from MCHB-CLABS will show the green light otherwise if read from MCHB-CSPEM, it will show red light.
(e.g : if syntax error in report it is showing red light signal , like that how to set in report program)
Thanking you.
SubashHi,
In your internal table declaration, include yet another field for lights..
DATA: begin of itab,
lights type light,
end of itab.
DATA: GV_LAYOUT TYPE SLIS_LAYOUT_ALV.
GV_LAYOUT-LIGHTS_FIELDNAME = 'LIGHTS'.
Use the GV_LAYOUT in your FM to display the ALV.
IS_LAYOUT = GV_LAYOUT
If itab-lights = 1 => Error
itab-lights = 3 => Success
itab-lights =2 => Warning -
How can i set the location of my pictures in photos app for mac osx?
Not every photo I import into my MacBook have all the metadata in them. iPhoto allowed for setting the location, but in Photos I cannot manage to do so. Is there another way to do it or perhaps it's coming with an update?
Thanks
MacBook Mid-2010
OSX Yosemite 10.10.3
Photos 1.0Adding location data is not yet supported in Photos.
And we do not know, if future updates will support this feature. It might help, if you send back feedback to Apple with a feature request. You can use this form: Apple - Photos - Feedback
As a work-around, use third party apps to add location data before you import the photos to Photos.
You could, for example, first import to iPhoto, add the locations, batch change the titles and captions, do all the things that are not yet supported in the new Photos, then export the photos from iPhoto and import them to Photos.
Or use the free exiftool, if you like the Terminal.
See: http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html#geotagging_exampl es
To install exiftool: http://www.sno.phy.queensu.ca/%7Ephil/exiftool/install.html
Other convenient apps are Jetphoto Studio, Geotagalog, there are many more ..
I use Jetphoto Studio, but it is not free. -
How to set the weather app to follow location
is so there a way that you can set the weather app in iOS 8 to follow your location, I know you can set the location services in privacy this is set to always but it still doesn't follow the location I'm in.
APriam I missing something?
THank youThe weather app already does follow you. There is nothing to set. The first entry is always your current location and cannot be deleted. You are able to add other locations as well.
-
How to set the number of rings before voice mail answers?
How to set the number of rings before voice mail answers?
For me its:
1. Open the phone app and dial *#61# on the Keypad. Press the Call button.
2. Locate this text on the screen: "Setting Interrogation Succeeded, Voice Call Forwarding, When Unanswered, Forwards to +" and record the 11-digit number after the + symbol.
3. Touch the Dismiss button. Now enter this code on the Keypad: *61*+ followed by the 11-digit Forwards to number recorded in step 2, followed by *11 and *ringtime#. Ringtime is the number of seconds you want your iPhone to ring before voicemail picks up. Your finished code should look something like this:
*61*+18555513466*11*30#
In the example above the ring time is set to 30 seconds. Press the Call button.
4. You should receive the message: Setting Activation Succeeded. Press Dismiss and next time you receive a call it will ring for the new amount of time before going to voicemail. -
SRM 4.0- How to set the default values for product type (01) only for SC
The radio button Service should not be visible.
Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
How to set the default values for product type (01) only for SC
We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
Here we can set defalut value 01 but it is not correct one since same search help is using several places.
We need to limit the search help results only for SC.
Kindly help out me ASAP.The easiest way to set defautl values is to edit the batch class.
Goto the characteiristic and go to update values.
In here you probably have something like 0 - 100 as a spec range.
On the next line enter the default value within this range. At the end of the line, click in the box in the column labelled "D". This indicates the defautl value for the characteristic.
If you need to you can do this in the material classification view as well.
Just to be clear, these values will only show up in the batch record. You can not have defautl values in resutls recording screens.
FF -
How to set the background for all components?
hi
Does anybody know how to set the DEFAULT background color in an application.. I need it because in jdk 1.3 the default bgcolor is grey and in 1.5 it is white.. and I wish white as well.. so to make it also white in jdk 1.3 I need to use the (a bit annoying) anyContainer.setBackground( Color.white ); and these are lots in my app.. So my question is: is there such an overall class with a function (say UIManager.setComponentsBackground( Color color ) ) for such a purpose?
any tip or link would be greatly appreciatedDoes anybody know how to set the DEFAULT background color in an applicationthis might get you close
import java.awt.*;
import javax.swing.*;
import java.util.Enumeration;
class ApplicationColor extends JFrame
public ApplicationColor()
setApplicationColor(Color.RED);
setLocation(400,300);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel jp = new JPanel(new BorderLayout());
jp.add(new JTextField("I'm a textfield"),BorderLayout.NORTH);
jp.add(new JComboBox(new String[]{"abc","123"}),BorderLayout.CENTER);
jp.add(new JButton("I'm a button"),BorderLayout.SOUTH);
getContentPane().add(jp);
pack();
public void setApplicationColor(Color color)
Enumeration enum = UIManager.getDefaults().keys();
while(enum.hasMoreElements())
Object key = enum.nextElement();
Object value = UIManager.get(key);
if (value instanceof Color)
if(((String)key).indexOf("background") > -1)
UIManager.put(key, color);
public static void main(String[] args){new ApplicationColor().setVisible(true);}
} -
How to set the user who can access to repository
Hi,
I know we can create user and group in the tools->security.And if this users is belong to Administrators Group, it can access to RPD and do some modify..
Can we create group or user who can access RPD in some situation(like mentioned in HELP, A can access to repository on Mondays and Wednesdays, B can access to repository on Saturdays and Sundays) and how to set the privilege..
Thanks
anneHi Anne,
The example specified in Help is about restricting query execution on weekdays/weekends for a particular webgroup. Inorder to configure such access ,
Double click on the web group name -> Query Limits tab ->Click on Restrict button provided against the physical connection pool ->Select Allow/Disallow by selecting a particular time period.
Rgds,
Dpka -
Can anybody help me? How to set the position of a pop up window(new Jframe)
in my program, there is a functionality such as this: user clicks the button and then system generate a new window(new Jframe),
but the posistion in the screen where the window was generated is fixed, everytime it pops up at the left side of my main frame, I am just wondering is there a way of seting the posistion of the window which will pop up?
thanks for your replySure. Read the JFrame API. Look at all the setXXX methods and you will find one that allows you to set the location of the frame on the desktop.
Maybe you are looking for
-
Data Source Creation in R/3
Hi all. I need to extract the data from multiple tables from R/3. For that I am creating a datasource using RSO2. In this scenario do I need choose extraction from view ( IN rso2)& create a view combining these tables & use this in data source cr
-
URGENT -- Problem in using JMS with JBOSS
Hi, My jar file which includes my Java/JMS classes can easily be executed when I use Sun Application server, but I don't know how I can change execute the same jar file in when I switch to JBOSS. Do I need to use ants? or I can use the original jar f
-
Https site are not opening on tmg 2010
Hi I ;ve configure TMG Server 2010 on server 2008r2 SP1. but there https site are not working. I 've created access rules but after that its not working. so please tell me that how to open (Allow) HTTPS websites.
-
24" LCD ACD dead on Nvidia geforce120 on pc
Hi. I installed the Nvidia Geforce 120 in my pc in order to use the 24" ACD. The card works fine and upgraded my performance with my old 20" Apple DVI display, but the new monitor is cold and dark. By the way, does it even have a pilot light? I playe
-
I keep getting this message the past week when I try to copy/paste text to Pages or upload a picture to a website chat forum. I don't know what it means, or how to correct it. I'm running a 2009 iMac desktop with OSX Lion 10.7.3 with 2 GB Any help