java


java SWT clicking a button


when i create an interface, using SWT, i create a button and then i need when clicking this button new class is called, i tried this:
Button btnNewButton_1 = new Button(shell, SWT.NONE);
btnNewButton_1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected (SelectionEvent e){
Holder hold = new Holder();
hold.create_holderTrust();
}
});
but when i click the button the class is not called,
Can anyone please try to hepl me, i need this in my project
The click of the button should work, try this:
Button btnNewButton_1 = new Button(shell, SWT.NONE);
btnNewButton_1.addSelectionListener(new SelectionAdapter() {
public void widgetSelected (SelectionEvent e){
System.out.println("TEST");
Holder hold = new Holder();
hold.create_holderTrust();
}
});
If TEST is printed in the console then something is wrong with your hold.create_holderTrust() call. You could also set a breakpoint to figure that out.

Related Links

How to resolve 'No suitable driver found' error
How to define a simple model for a complex TreeView<T> in JavaFX 8?
How i don't show same window more than one at a time
Error in appcompat_v7>res>values_v21>style_base.xml and R cannot be resolved to a variable in MainActivity.Java
why stop isRoundNumber with recursion
How can I provide meaningful error feedback from validation without side effects?
Changing tree node font color
java.io.FilePermission read access denied when launching applet with java 8
Changing the colour of energy bars depending on their values?
Java JDBC PreparedStatement Foreign Key Constraint Failed
How to upload a file using xmlHTTPRequest in angular js?
Sqlite data enter error into table name as variable from another class
java maven missing plugin descriptor for plexus-utils
Java - Parameter annotations
Reading properties from a file in Java Spring [duplicate]
How to switch between two JDKs in Android Studio? [duplicate]

Categories

HOME
testing
blogger
include
lodash
vmware
objectgears
spring-cloud-stream
malloc
fancybox
add
dacpac
resize
fallback
decomposition
jsprit
code-review
riot.js
cloudhub
arabic
sylius
user-interaction
react-css-modules
elasticsearch-net
windows-server-2000
newline
r-raster
semantic-versioning
oracle-fusion-middleware
http-referer
mapdb
http-digest
jquery-bootgrid
mixture-model
reportbuilder
dynamic-reports
quadratic-programming
mime
angular2-meteor
executenonquery
fault
outlook-2013
komodoedit
worksheet
elgg
titanium-android
dwscript
root-framework
word-vba-mac
lttng
disque
python-stackless
oauth2client
msys
coveralls
kcachegrind
emailrelay
android-listview
map-projections
riak-cs
ibaction
lustre
facebook-graph-api-v2.4
html-helper
eol
system.net.webexception
dealloc
balanced-payments
industrial
multiprocessor
blending
tws
gridcontrol
xamlparseexception
armcc
enter
dotnethighcharts
vdsp
mod-auth
android-sdk-2.1
datareader
cxxtest
fluent-interface
asp.net-mvc-areas
infrastructure
webkit.net
ctp4
noscript

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile