Search Results

Search found 1192 results on 48 pages for 'listener'.

Page 29/48 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • event listeners on plugin in document.onload events in opera

    - by gf
    I am trying to understand an issue where event-listener registration on plugins doesn't work in Opera unless i delay them. In particular, this doesn't work: document.onload = function() { plugin.addEventListener("foo", function() { alert('onFoo'); }, false); } while delaying the addEventListener() call somewhat through e.g. an alert() does: document.onload = function() { alert('onload()'); plugin.addEventListener("foo", function() { alert('onFoo'); }, false); } It seems that plugins are only loaded after document.onload. As a non-web-developer, am i missing something simple here? Or is this a known Opera problem with a common work-around?

    Read the article

  • How to handle runtime exception on playing audio files?

    - by Maxood
    I have a button that plays an audio file on its click listener. If the button is clicked again and again while the audio file is being played then the app crashes. What's the solution? Here is some code for reference: private OnClickListener btnMercyListener = new OnClickListener() { public void onClick(View v) { // Toast.makeText(getBaseContext(), // "Mercy audio file is being played", // Toast.LENGTH_LONG).show(); if (status==true) { mp.stop(); mp.release(); status = false; } else { mp = MediaPlayer.create(iMEvil.this,R.raw.mercy); //mp.start(); try{ mp.start(); status= true; //mp.release(); }catch(NullPointerException e) { Log.v("MP error",e.toString()); } } mp.setOnCompletionListener(new OnCompletionListener(){ // @Override public void onCompletion(MediaPlayer arg0) { mp.release(); status = false; } } ); } };

    Read the article

  • JSlider jump on mouse click

    - by Aly
    Hi, I have a JSlider which shows bet sizes (for a poker game) I am trying to achieve the effect that when a mouse click occurs the slider jumps forward by a bet amount (i.e. a big blind amount) rather than just incrementing by one. If the mouse click happens to the left of the bar i want it to decrement by a fixed amount else increment. I looked into attaching a mouse listener, but do not know how I can use the event to find out on what side of the bar the mouse was clicked. Any ideas?

    Read the article

  • How to "chain" modal dialogs in YUI 2 ?

    - by giulio
    I have a modal dialog box presented in Yahoo UI. The user selects a value from dialog "A", and then I want to present another modal dialog box to collect some more data in dialog "B". I have been using the YAHOO.widget.Dialog successfully. The problem seems to be that you can't initiate dialog window "B" from the handler function of dialog "A". So, how can you programmatically launch a second dialog window after the user hits the "OK" button on the first ? (I had tried to create an additional Listener for a field that is updated in dialog "A" to trigger dialog "B" but this doesn't work either.) Thanks..

    Read the article

  • Composing actors

    - by Brian Heylin
    I've implemented a Listenable/Listener trait that can be added to Actors. I'm wondering if it's possible to attach this style of trait to an actor without it having to explicitly call the listenerHandler method? Also I was expecting to find this functionality in the Akka library. Am I missing something or is there some reason that Akka would not not include this? trait Listenable { this: Actor => private var listeners: List[Actor] = Nil protected def listenerHandler: PartialFunction[Any, Unit] = { case AddListener(who) => listeners = who :: listeners } protected def notifyListeners(event: Any) = { listeners.foreach(_.send(event)) } } class SomeActor extends Actor with Listenable { def receive = listenerHandler orElse { case Start => notifyListeners(Started()) case Stop => notifyListeners(Stopped()) } }

    Read the article

  • JW Player: cross-browser "display:none" player behavior

    - by two7s_clash
    Is there a simple, upfront method to have FF and IE treat hidden JW Players the same? I am placing different instances of the player dynamically in jQuery generated tabs. In effect, switching tabs hides the parent div of each player. In FireFox, the tab switch and accompanying "display" change stops the player. This doesn't happen in IE. I would like it to. What is the easiest way to have both browsers act the same? I am hoping for a CSS/HTML solution, either thorough the way the players are embedded or a style rule Otherwise I suppose I will need to add an item listener that compares the currently selected tab id to currently active players... but I'd rather not go that route. Thanks for your tips! EDIT: So, I'd rather be able to change the player CSS or markup on tab change than send stop events to all the players but the player in the currently active tab.

    Read the article

  • JSF f:event preRenderView is triggered by f:ajax calls and partial renders, something else?

    - by Andrew
    So we have an f:event: <f:metadata> <f:event type="preRenderView" listener="#{dashboardBacking.loadProjectListFromDB}"/> </f:metadata> Which is triggered as desired on initial page load (render). However this preRenderView event is also triggered by an ajax partial page render, which re-renders an h:panelgroup with the id projectListing, as below. <h:commandButton action="#{mrBean.addProject}" value="Create Project" title="Start a new project"> <f:ajax render="projectListing" /> </h:commandButton> I only want the dashboardBacking.loadProjectListFromDB to be called for the initial page render, but not when there is an ajax partial render. Is there a more appropriate event or method I could be using?

    Read the article

  • Transfer file using BITS without using IIS as the server?

    - by rwmnau
    I know that I can transfer files using BITS and a wrapper like SharpBITS, but it seems that I need an IIS server on one end - either to upload to or download from. Is there a way to use the BITS protocol to transfer a file without requiring IIS? Some kind of a "BITS Server" or "Listener" project that my client's BITS service can connect to. I'm looking for functionality that's exactly what BITS provides, but I'd prefer not to require that IIS be installed (though if I have to, I can). Thanks!

    Read the article

  • jtabbedpane different sized tabs

    - by Eric
    hi, im making a search function for a database that uses a jtabbedpane with one tab for a quick search, and one for an advanced search. the advanced search has quite a few more fields, so it needs to be larger, but i dont want the whole window to always be at the largest size for aesthetic reasons. i have added a change listener to the pane, and tried resizing the pane based on which tab it is, and the code executes when the tab is clicked, but does nothing. ive tried using tabbedSearchPane.setSize() followed by tabbedSearchPane.validate(), as well as resizing components around it using setSize+validate, and nothing seems to do anything. i really just need to know how to ACTUALLY change the size of a jtabbedpane.

    Read the article

  • Concurrency Problem in Java ...

    - by Tara Singh
    I am designing a client-server chat application in Java. This is a secure application where the messages are exchanged using cryptographic algorithms. I have one server and it can support many clients. My problem is that when one client logs on the server it works fine, but when another user logs into the system, the server starts giving me bad padding exceptions for the encrypted text. I am not able to figure out the problem, according to my logic, when new connection request to server is made, the server creates a thread for listening to the client. Is it possible that once the instance of thread class is created, it does all the processing correctly for the first client, but not for the second client because the variables in server listener thread class already have some previous value, and thus the encrypted text is not decrypted properly? Please advise how I can make this process more robust so that the number of clients does not affect how well the server functions.

    Read the article

  • realtime collaborative editing: mobwrite on windows7 x64

    - by collabwriter
    I have set up Mobwrite on my Win7 development machine using the daemon and q.py listener. The client test suite passes, but when I run the server test suite, everything fails with this sort of response: Question: U:user10259538167863824 f:0:unittest10259538167863824 R:0:Hello world Expected: u:user10259538167863824 F:0:unittest10259538167863824 D:0:=11 Actual: u:user10259538167863824 F:0:unittest10259538167863824 D:0:=11 Diff: u:user10259538167863824 ¶ F:0:unittest10259538167863824 ¶ D:0:=11¶ ¶ ¶ I am assuming it has something to do with line endings, but I don't know what to do. Can anyone shed some light on this? Thanks so much! PS: I'm running Python 2.7

    Read the article

  • reuse proxy call data for extjs store

    - by user124118
    I have a xml that i need to bind to XTemplate. The XML structure is as follows John Smith John Doe Johny Byrd I am using Ext.data.Store with proxyurl tot he xml, Ext.data.XML reader to rad the xml and a listener that bind the data to the Xtemplate. The xmlreader needs a root node to be specified and i have to give root name as "Student_Name" It need to bind it to one more store for "Faculty_Name" as the root node. SO i end up calling my service to get xml twice. Is there a way to call service once to get the xml and bind it to two stores with different root nodes.

    Read the article

  • Android ActivityGroup

    - by Vahag Vardanyan
    I know that ActivityGroup is in the "past", but I want to learn how to use it. So I write a simple TabHost, and want to show different activities using ActivityGroup. Here are the parts of code Player.java package player.org; import android.app.Activity; import android.app.TabActivity; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.media.MediaPlayer; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.Button; import android.widget.ProgressBar; import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.TabHost; import android.widget.TabWidget; import android.widget.TextView; public class Player extends TabActivity { /** Called when the activity is first created. */ private MediaPlayer media=null; private SeekBar progress; private View play; private Progress p; TabHost tabhost; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tabs); Resources res=getResources(); //TabHost tabhost=(TabHost) findViewById(R.id.tabhost); // tabhost.setup(); tabhost=getTabHost(); TabHost.TabSpec spec; Intent intent; intent=new Intent(this,Progress.class); spec=tabhost.newTabSpec("now playing").setIndicator("Now playing", res.getDrawable(R.drawable.icon)) .setContent(intent); tabhost.addTab(spec); intent=new Intent(this,Group.class); spec=tabhost.newTabSpec("all_songs").setIndicator("All songs", res.getDrawable(R.drawable.songs)) .setContent(intent); tabhost.addTab(spec); //intent=new Intent(this,Progress.class); spec=tabhost.newTabSpec("artists").setIndicator("Artists", res.getDrawable(R.drawable.icon)) .setContent(intent); tabhost.addTab(spec); spec=tabhost.newTabSpec("alboom").setIndicator("Alboom", res.getDrawable(R.drawable.icon)) .setContent(intent); tabhost.addTab(spec); tabhost.setCurrentTab(0); } } Group.java import android.os.Bundle; import android.view.View; public class Group extends ActivityGroup { @Override public void onCreate(Bundle savedInstanceStated) { super.onCreate(savedInstanceStated); View view = getLocalActivityManager().startActivity("AllSongs", new Intent(this, AllSongs.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)).getDecorView(); setContentView(view); } AllSongs.java package player.org; import java.util.ArrayList; import android.R.id; import android.app.ActivityGroup; import android.app.ListActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.Window; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TabHost; public class AllSongs extends ListActivity{ ArrayList<String> listItem=new ArrayList<String>(); ArrayAdapter<String> adapter; ListView listView; //Player p; TabHost tab; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //p=new Player(); adapter=new ArrayAdapter<String>(this,R.layout.list_item,listItem); setListAdapter(adapter); listView=getListView(); listView.setTextFilterEnabled(true); listView.setOnItemClickListener(listener); addItem("vahag"); addItem("vahagvahag"); } private OnItemClickListener listener=new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { // TODO Auto-generated method stub Intent intent = new Intent(AllSongs.this,Progress.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); Group group= (Group) getParent(); View view=group.getLocalActivityManager().startActivity("Progress",intent).getDecorView(); setContentView(view); } }; public void addItem(String s) { listItem.add(s); adapter.notifyDataSetChanged(); } } and the Progress.java package player.org; import android.app.Activity; import android.app.ActivityGroup; import android.app.Dialog; import android.app.TabActivity; import android.content.Context; public class Progress extends Activity { // Called when the activity is first created. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } So, AllSongs.java try to change current activity with Progress activity, but when I press on list item, the Programm forsed closed, and logChat says "08-17 12:49:26.471: ERROR/AndroidRuntime(1500): java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'" I can't figure how to fix this problem, Can anyone helps?

    Read the article

  • synchronizing audio over a network

    - by sharkin
    I'm in startup of designing a client/server audio system which can stream audio arbitrarily over a network. One central server pumps out an audio stream and x number of clients receives the audio data and plays it. So far no magic needed and I have even got this scenario to work with VLC media player out of the box. However, the tricky part seems to be synchronizing the audio playback so that all clients are in audible synch (actual latency can be allowed as long as it is perceived to be in sync by a human listener). My question is if there's any known method or algorithm to use for these types of synchronization problems (video is probably solved the same way). My own initial thoughts centers around synchronizing clocks between physical machines and thereby creating a virtual "main timer" and somehow aligning audio data packets against it. Some products already solving the problem: http://www.sonos.com http://netchorus.com/ Any pointers are most welcome. Thanks. PS: This related question seem to have died long ago.

    Read the article

  • Android Custom View to Activity communication

    - by Blumer
    I have a custom control/view that observes the direction of a gesture within its bounds. I would like to send a different message back to the Activity hosting the View depending on the direction of the gesture. I'm having a hard time determine what the right way to do this is. I would think I could raise a custom event in the control and then stick a listener on the control in the activity, but I cannot find any information on custom events in Android. Any help would be appreciated. Thanks.

    Read the article

  • jQuery.ajax checking if there is already another xhr

    - by digitalFresh
    I have a page when, if the user is near the bottom of the page, loads the next page. I just recently switched it to jQuery, and now use the jQuery.ajax() function to get the data. However, now i cannot check if the xhr is already loading, making the page load multiple xhrs when the user near the bottom. My listener is: $(document).scroll(function () { if(/* scrollbar is near bottom */) loadxhr(dat++); //function that calls jQuery.ajax() } }); Basically, can you track the readyState of the call in a global scope?

    Read the article

  • Detecting rotation to landscape manually

    - by Thomas Joos
    hi all, I am working on an iPhone application based on UITabBarController and UIViewControllers for each page. The app needs to run in portrait mode only, so every view controller + app delegate goes with this line of code: (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); } There is one view controller where I would like to pop up a UIImageView when the iPhone is rotaed to landscapeleft. The design of the image looks landscape, although the width and height are 320x460 ( so its portrait ). How can/should I detect this type of rotation manually, just in this specific view controller, withouth having an auto rotation on the entire view? Thomas UPDATE: Thanks! I added this listener in the viewDidLoad: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didRotate:)name:UIDeviceOrientationDidChangeNotification object:nil]; the didRotate looks like this: (void) didRotate:(NSNotification *)notification { UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation]; if (orientation == UIDeviceOrientationLandscapeLeft) { //your code here } }

    Read the article

  • java.sql.SQLException: Operation not allowed after ResultSet closed

    - by javatraniee
    Why am I getting an Resultset already closed error? public class Server implements Runnable { private static int port = 1600, maxConnections = 0; public static Connection connnew = null; public static Connection connnew1 = null; public static Statement stnew, stnew1, stnew2, stnew3, stnew4; public void getConnection() { try { Class.forName("org.gjt.mm.mysql.Driver"); connnew = DriverManager.getConnection("jdbc:mysql://localhost/db_alldata", "root", "flashkit"); connnew1 = DriverManager.getConnection("jdbc:mysql://localhost/db_main", "root", "flashkit"); stnew = connnew.createStatement(); stnew1 = connnew.createStatement(); stnew2 = connnew1.createStatement(); stnew3 = connnew1.createStatement(); stnew4 = connnew1.createStatement(); } catch (Exception e) { System.out.print("Get Connection Exception---" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "----- > " + e); } } public void closeConnection() { try { if (!(connnew.isClosed())) { stnew.close(); stnew1.close(); connnew.close(); } if (!(connnew1.isClosed())) { stnew2.close(); stnew3.close(); stnew4.close(); connnew1.close(); } } catch (Exception e) { System.out.print("Close Connection Closing Exception-----" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "------->" + e); } } Server() { try { } catch (Exception ee) { System.out.print("Server Exceptions in main connection--" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "------>" + ee); } } public static void main(String[] args) throws SQLException { int i = 0; Server STUD = new Server(); STUD.getConnection(); try { ServerSocket listener = new ServerSocket(port); Socket server; while ((i++ < maxConnections) || (maxConnections == 0)) { @SuppressWarnings("unused") doComms connection; server = listener.accept(); try { ResultSet checkconnection = stnew4 .executeQuery("select count(*) from t_studentdetails"); if (checkconnection.next()) { // DO NOTHING IF EXCEPTION THEN CLOSE ALL CONNECTIONS AND OPEN NEW // CONNECTIONS } } catch (Exception e) { System.out.print("Db Connection Lost Closing And Re-Opning It--------" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "--------" + e); STUD.closeConnection(); STUD.getConnection(); } doComms conn_c = new doComms(server, stnew, stnew1, stnew2, stnew3); Thread t = new Thread(conn_c); t.start(); } } catch (IOException ioe) { System.out.println("Main IOException on socket listen: " + ioe); } } public void run() { } } class doComms implements Runnable { private Socket server; private String input; static Connection conn = null; static Connection conn1 = null; static Statement st, st1, st2, st3; doComms(Socket server, Statement st, Statement st1, Statement st2, Statement st3) { this.server = server; doComms.st = st; doComms.st1 = st1; doComms.st2 = st2; doComms.st3 = st3; } @SuppressWarnings("deprecation") public void run() { input = ""; // char ch; try { DataInputStream in = new DataInputStream(server.getInputStream()); OutputStreamWriter outgoing = new OutputStreamWriter(server.getOutputStream()); while (!(null == (input = in.readLine()))) { savetodatabase(input, server.getPort(), outgoing); } } catch (IOException ioe) { System.out.println("RUN IOException on socket listen:-------" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "----- " + ioe); ioe.printStackTrace(); } } public void savetodatabase(String line, int port1, OutputStreamWriter outgoing) { try { String Rollno = "-", name = "-", div = "-", storeddate = "-", storedtime = "-", mailfrom = ""; String newline = line; String unitid = "-"; storeddate = new SimpleDateFormat("yyyy-MM-dd").format(new java.util.Date()); storedtime = new SimpleDateFormat("HH:mm:ss").format(new java.util.Date()); String sql2 = "delete from t_currentport where PortNumber='" + port1 + "''"; st2.executeUpdate(sql2); sql2 = "insert into t_currentport (unitid, portnumber,thedate,thetime) values >('" + unitid + "','" + port1 + "','" + storeddate + "','" + storedtime + "')"; st2.executeUpdate(sql2); String tablename = GetTable(); String sql = "select * from t_studentdetails where Unitid='" + unitid + "'"; ResultSet rst = st2.executeQuery(sql); if (rst.next()) { Rollno = rst.getString("Rollno"); name = rst.getString("name"); div = rst.getString("div"); } String sql1 = "insert into studentInfo StoredDate,StoredTime,Subject,UnitId,Body,Status,Rollno,div,VehId,MailDate,MailTime,MailFrom,MailTo,Header,UnProcessedStamps) values('" + storeddate + "','" + storedtime + "','" + unitid + "','" + unitid + "','" + newline + "','Pending','" + Rollno + "','" + div + "','" + name + "','" + storeddate + "','" + storedtime + "','" + mailfrom + "','" + mailfrom + "','-','-')"; st1.executeUpdate(sql1); } catch (Exception e) { System.out.print("Save to db Connection Exception--" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "-->" + e); } } }

    Read the article

  • JS Anonymous Scope...

    - by Simon
    this Application.EventManager.on('Click', function(args) { // event listener, args is JSON TestAction.getContents(args.node.id, function(result, e) { console.log(result); this.add({ title: args.node.id, html: result }).show(); }); }); I'm really struggling with scope and anonymous functions... I want this (on the 1st line) to be the same object as this (on the 5th line)... .call() and .apply() seemed to be the right sort of idea but I don't want to trigger the event... just change it's scope.... For a bit of contexts... the this in question is a TabContainer and TestAction is a RPC that returns content... Thanks....

    Read the article

  • TcpListener.Start() does not open the port

    - by SoMoS
    Hello, I have a class that inherits from the TcpListener, this class Shadows the Start method just to call the base Start() and the base BeginAcceptTcpClient(). From time to time the method is called but the port is not opened (netstat does not show the port open). The class looks like this Public Class ExtendedTcpListener Inherits System.Net.Sockets.TcpListener Public Shadows Sub Start() SyncLock (m_stopLock) MyBase.Start() MyBase.BeginAcceptTcpClient(AddressOf Me.CompleteAcceptTcpClient, Me) My.Application.Log.WriteEntry("Extended Tcp Listener started ...", TraceEventType.Verbose) End SyncLock End Sub Any idea on what's happening or how to debug the issue? As the Start() is called without exception I expected to find the port always opened (the log is always written). Extra information: when the Start method works fine it works each time until app is restarted. When the Start method does not work it won't work again until the app is restarted.

    Read the article

  • Flash Double-click an externally loaded SWF

    - by Trist
    OK. I've got a class (which extends MovieClip) that loads in an external SWF (made in pdf2swf). That is added to another class which has declared doubleClickEnabled = true and I'm listening for DOUBLE_CLICK events. Problem is when the SWF is loaded my code picks up no DOUBLE_CLICK events, only CLICK events. I've tried it without adding the SWF to the stage and it does pick up DOUBLE_CLICK events. Anybody come across this before? class ParentClass{ ... public function ParentClass(){ ... mcToLoadSWF = new MovieClip(); addChild(mcToLoadSWF); doubleClickEnabled = true; addEventListener(MouseEvent.DOUBLE_CLICK, doubleClickHandler); ... } } I've also tried adding the event listener to the mcToLoadSWF as well. No dice. Cheers Tristian

    Read the article

  • using addListener with WordPress audio player

    - by Jacob
    Hi, I'm trying to add a listener for the stop event in the word press audio player but usage seems to be undocumented. I'm hoping someone who knows a little flash can look at the code and tell me how it works: In the code at http://tools.assembla.com/1pixelout/browser/audio-player/trunk/source/classes/Application.as I see a snippet with this: ExternalInterface.call("AudioPlayer.onStop", _options.playerID); I was hoping that would let me capture the event in javascript with ("player" is the ID of my player) AudioPlayer.addListener("player", "AudioPlayer.onStop", function() { alert('stopped'); }); But my javascript function never seems to get called

    Read the article

  • Turn off LogEnabled Filter at run time - Logging Enterprise Application Block

    - by Or A
    Hi, so the story go like this: i'm using the Logging Enterprise Application block that provided by microsoft to log events in our application. The goal is to enabled event viewer logging at loading and then turn it off. What i did is to add EventLog TraceListener which write all our logs into the event viewer. What i'm trying to do is to disable it after the application was done loading. The only way that i can thing about is to add a LogEnabled Filter and then turn it off. However, i don't know how to access this filter at run time and disable log on this listener. if you have an idea, please share. Thanks

    Read the article

  • AS3 Event Bubbling outside of the Scenegraph/DisplayList

    - by Brian Heylin
    Hi just wondering if it is possible to take advantage of event bubbling in non display list classes in AS3. For example in the model of an application where there is a City class that contains many Cars. What methods are there to attach an event listener to a City object and receive events that bubble up from the child Cars. To clarify The City and Car objects are not part of the display list, they are not DisplayObjects. So can bubbling be implemented outside of the display list somehow? As far as I know, this is not possible without manually attaching event listeners to each Car object and re dispatching the event from the City object. Anyone else have a cleaner solution?

    Read the article

  • getting JSlider bar to move on mouse click event

    - by Aly
    Hi, I have a JSlider which shows bet sizes (for a poker game) I am trying to achieve the effect that when a mouse click occurs the slider jumps forward by a bet amount (i.e. a big blind amount) rather than just incrementing by one. If the mouse click happens to the left of the bar i want it to decrement by a fixed amount else increment. I looked into attaching a mouse listener, but do not know how I can use the event to find out on what side of the bar the mouse was clicked. Any ideas?

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >