Search Results

Search found 28864 results on 1155 pages for 'ob start'.

Page 42/1155 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • JPanel paint method is not being called, why?

    - by swift
    When i run this code the paintComponent method is not being called It may be very simple error but i dont know why this, plz. package test; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.image.BufferedImage; import javax.swing.BorderFactory; import javax.swing.JPanel; class Userboard extends JPanel { static BufferedImage image; String shape; Point start; Point end; Point mp; String selected; int ex,ey;//eraser int w,h; public Userboard() { setOpaque(false); System.out.println("paper"); setBackground(Color.white); setBorder(BorderFactory.createLineBorder(Color.black)); } public void paintComponent(Graphics g) { System.out.println("userboard-paint"); try { //g.drawImage(image, 0, 0, this); Graphics2D g2 = (Graphics2D)g; g2.setPaint(Color.black); if(start!=null && end!=null) { if(selected==("elipse")) { System.out.println("userboard-elipse"); g2.drawOval(start.x, start.y,(end.x-start.x),(end.y-start.y)); System.out.println("userboard-elipse drawn"); } else if(selected==("rect")) g2.drawRect(start.x, start.y, (end.x-start.x),(end.y-start.y)); else if(selected==("line")) g2.drawLine(start.x,start.y,end.x,end.y); } } catch(Exception e) {} } //Function to draw the shape on image public void draw() { System.out.println("Userboard-draw"); System.out.println(selected); System.out.println(start); System.out.println(end); Graphics2D g2 = image.createGraphics(); g2.setPaint(Color.black); if(start!=null && end!=null) { if(selected=="line") g2.drawLine(start.x, start.y, end.x, end.y); else if(selected=="elipse") { System.out.println("userboard-elipse"); g2.drawOval(start.x, start.y, (end.x-start.x),(end.y-start.y)); System.out.println("userboard-elipse drawn"); } else if(selected=="rect") g2.drawRect(start.x, start.y, (end.x-start.x),(end.y-start.y)); } start=null; repaint(); g2.dispose(); } //To add the point to the board which is broadcasted by the server public void addPoint(Point ps,String varname,String shape,String event) { try { if(end==null) end = new Point(); if(start==null) start = new Point(); if(shape.equals("elipse")) this.selected="elipse"; else if(shape.equals("line")) this.selected="line"; else if(shape.equals("rect")) this.selected="rect"; else if(shape.equals("erase")) erase(); if(end!=null && start!=null) { if(varname.equals("end")) end=ps; else if(varname.equals("mp")) mp=ps; else if(varname.equals("start")) start=ps; if(event.equals("drag")) repaint(); else if(event.equals("release")) draw(); } repaint(); } catch(Exception e) { e.printStackTrace(); } } //Function which provides the erase functionality public void erase() { Graphics2D pic=(Graphics2D) image.getGraphics(); pic.setPaint(Color.white); if(start!=null) pic.fillRect(start.x, start.y, 10, 10); } //To set the size of the image public void setWidth(int x,int y) { System.out.println("("+x+","+y+")"); w=x; h=y; image = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); } //Function to add buttons into the panel, calling this function returns a panel }

    Read the article

  • C#- Executing Exe without using System.Diagnostics.Process.Start

    - by Lee
    Hi all, I have a program that crashes when I execute it with System.Diagnostics.Process.Start in C#, but works fine if I execute a shortcut or batch file that runs the exe. Are there any alternative means of executing programs in C#, or any reasons why Process.Start might not work compared to the shortcut or batch file? I'd rather not have to generate a batch or shortcut file to run the application. Thanks

    Read the article

  • Can Ghostscript to start numbering pages from zero?

    - by SuZi
    I am using Ghostscript to convert a multi-page pdf to individual jpg files and can get it to output the files numbered like page_%03d.jpg but it always starts at page_001.jpg and i need it to start numbering the output files starting from page_000.jpg. Is there a setting i can use to get Ghostscript to start at zero or am i going to have to rename all the files after processing?

    Read the article

  • How to start Android Kernel programming?

    - by Rajapandian
    Hi All, I am 6 months experience in Android, use to develop simple UI based application. Now i want to write application targeting the Android core Kernel.For example i want to develop a Framework which is not present in Android.To achieve that we have to write the code for the Kernel. I dont know where and how to start the Android Kernel Programming. If anybody knows the way to start it please help me. Regards, Rajapandian.K

    Read the article

  • Howto start writing iPad applications?

    - by Lothar
    I know Objective-C from Desktop Apple Programming. But i want to jump on the iPad bandwagon and start developing some small edutainment applets. Is the iPad API the same as iPhone just with more power? Do i need to join the iPhone developer program and does it still start with $100. Is there any iPad emulator yet?

    Read the article

  • Fiddler - Daily stop start

    - by weismat
    What is the best way to stop/start Fiddler as a daily task? I am usin Fiddler to monitor/logs https trafficon machine which runs fully automated and runs software which is not controlled by me, but uses https. My machine stopped yesterday because Fiddler went out of memory after running over 3 days and now I want to have a clean way to start/stop it. I guess I could just specify a process duration in the task manager, but I would prefer something cleaner, especially to avoid issues when things are started manually.

    Read the article

  • Python enumerate built-in error when using the start parameter

    - by TheJuice
    I'm modifying some code that calls enumerate on a list declared via a list comprehension e.g. self.groups = [Groups(self, idx) for idx in range(n_groups)] then later: for idx, group in enumerate(self.groups): # do some stuff but when I change the enumerate call to start at the 2nd list element via the start parameter e.g. for idx, group in enumerate(self.groups[1]): I get an exception: exceptions.TypeError: 'Group' object is not iterable Could someone explain why this is?

    Read the article

  • Reasons to start a new project in COBOL

    - by luvieere
    Are there any feasible reasons to start a new project in COBOL? What benefits of this language one would find convincing enough to start a new project in it? I'm thinking more about viewing the language in terms of Behavior Driven Development, something related to the steps involved in using a framework such as Cucumber, only that behavior description and step definition would be integrated into one unit by using tha language's features.

    Read the article

  • start a process using QProcess

    - by kaycee
    i'm trying to start Microsoft word using QProcess as following: QString program = "WINWORD.EXE"; process->start(program); but nothing happens... winword.exe is on path (so when i type winword.exe word is openning up) is it the right way to do so ?

    Read the article

  • Help me start out with OpenGL

    - by Arun Thakkar
    Till today I am working with Basic UIKIT application but now onwards I need to work in OpenGL. Problem is I have not any idea about OpenGL and am confused lot about how to start and from where to start. I need to create an application which is same as "iBeer" (see movie in YouTube). So I am having lots of confusion about how do I create graphics of beer that you seen in application, so what should be preferred library?

    Read the article

  • IntelliJ bad plugin how to start

    - by Shawn
    Hi I have just started using IntelliJ again and have version 9. I just installed the Mecurial plugin and now the ide won't start anymore. Has an error of Fatal error initializing class com.intellij.openapi.actionSystem.ActionManager: java.lang.VerifyError: class com.dcx.hg.MercurialVcs overrides final method getName.()Ljava/lang/String; I now know that I should be using the plugin hg4idea Is there a way I can remove this plugin so I can start the ide, I am sure there must be.. Thanks in advance.

    Read the article

  • How to start/stop CrossSlide (jQuery)

    - by Alex
    I found that CrossSlide causes video playback on the same page to stutter quite badly. My thought was to have the cross slide effect on the same page stop or pause during video play back, annd then start again when video stops. Id doesn't look like there is any start stop function included. Does any one know how I might be able to accomplish this? Thanks.

    Read the article

  • Why does Chrome not start correctly when using C# Process.Start?

    - by nbolton
    I'm able to start Chrome successfully using this C# code: Process.Start("chrome", "http://www.google.co.uk"); However, it does two things wrong: It does not navigate to the URL specified in arguments It does not re-use the existing Chrome window (it opens a new one) I've tried using ProcessStartInfo and setting UseShellExecute and LoadUserProfile just in case these did something, but this makes no difference. Any ideas?

    Read the article

  • System.Diagnostics.Process.Start not work with IIS, but on ASP.NET Development Server

    - by subbu
    I am using VS2008 C# and testing on my local XP Pro PC with local IIS, I have wrote a web service to call a third party software .exe file to use svn checkout commands to insert data into a folder, which use System.Diagnostics.Process.Start . The same codes did work when I use VS2008 build-in ASP.NET Development Server(http://localhost:2999/MyServices/MyServices.asmx). but when I use IIS normal URL(http://developer/MyServices/MyServices.asmx) to run Process.Start on the web service, it just haunlted and not doing anything.plz send one sample program.

    Read the article

  • difference between thread.start() and executor.submit(thread)

    - by Mrityunjay
    hi, i am facing a problem regarding the thread. I am having a class which implements runnable, and i can use thread.start() method on that class. My question is i have one more class java.util.concurrent.ExecutorService in which i can call executor.submit(thread).. can anyone please tell me what is the difference between thread.start() and executor.submit(thread)...

    Read the article

  • Transactional NTFS (TxF) on Process.Start()

    - by Ian
    Consider the following code: try { using(TransactionScope) { Process.Start("SQLInstaller.EXE"); throw new Exception(); Commit(); } } catch(Exception ex) { //Do something here } Will the changes made by SQLInstaller.exe be rollback in this scenario? More specifically, will the changes made by an external process launched through Process.Start() be handled by TxF? Thanks!

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >